본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)40k · #7352

python-pypi-package-builder

하는 일

이 가이드는 Python 라이브러리를 만들고, 테스트하고, PyPI(Python 패키지 '마켓플레이스')에 게시하도록 돕습니다. 코드 정리부터 최종 릴리스까지 다루며, 패키지가 잘 작동하고 다른 개발자가 쉽게 쓸 수 있도록 합니다.

사용하는 경우

  • ✓공유할 첫 Python 라이브러리를 만들고 싶을 때.
  • ✓Python 패키지를 PyPI에 게시해야 할 때.
  • ✓기존 Python 프로젝트를 정리하고 테스트하고 싶을 때.

스킬 링크

https://github.com/github/awesome-copilot/blob/main/skills/python-pypi-package-builder/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/github/awesome-copilot/blob/main/skills/python-pypi-package-builder/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“'my_utility'라는 Python 라이브러리를 어떻게 만들고 게시하나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 가이드는 코드를 정리하는 가장 좋은 방법과, 패키지를 만들고 테스트하고 게시하는 올바른 도구를 고르도록 돕습니다. 또한 패키지의 버전을 관리하는 방법과 '타입 힌트' 같은 최신 기능을 쓰는 방법도 설명합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Python PyPI Package Builder Skill

A complete, battle-tested guide for building, testing, linting, versioning, typing, and publishing a production-grade Python library to PyPI — from first commit to community-ready release.

AI Agent Instruction: Read this entire file before writing a single line of code or creating any file. Every decision — layout, backend, versioning strategy, patterns, CI — has a decision rule here. Follow the decision trees in order. This skill applies to any Python package type (utility, SDK, CLI, plugin, data library). Do not skip sections.


Quick Navigation

Section in this file What it covers
1. Skill Trigger When to load this skill
2. Package Type Decision Identify what you are building
3. Folder Structure Decision src/ vs flat vs monorepo
4. Build Backend Decision setuptools / hatchling / flit / poetry
5. PyPA Packaging Flow The canonical publish pipeline
6. Project Structure Templates Full layouts for every option
7. Versioning Strategy PEP 440, semver, dynamic vs static
Reference file What it covers
references/pyproject-toml.md All four backend templates, setuptools_scm, py.typed, tool configs
references/library-patterns.md OOP/SOLID, type hints, core class design, factory, protocols, CLI
references/testing-quality.md conftest.py, unit/backend/async tests, ruff/mypy/pre-commit
references/ci-publishing.md ci.yml, publish.yml, Trusted Publishing, TestPyPI, CHANGELOG, release checklist
references/community-docs.md README, docstrings, CONTRIBUTING, SECURITY, anti-patterns, master checklist
references/architecture-patterns.md Backend system (plugin/strategy), config layer, transport layer, CLI, backend injection
references/versioning-strategy.md PEP 440, SemVer, pre-release, setuptools_scm deep-dive, flit static, decision engine
references/release-governance.md Branch strategy, branch protection, OIDC, tag author validation, prevent invalid tags
references/tooling-ruff.md Ruff-only setup (replaces black/isort), mypy config, pre-commit, asyncio_mode=auto

Scaffold script: run python skills/python-pypi-package-builder/scripts/scaffold.py --name your-package-name to generate the entire directory layout, stub files, and pyproject.toml in one command.


1. Skill Trigger

Load this skill whenever the user wants to:

  • Create, scaffold, or publish a Python package or library to PyPI
  • Build a pip-installable SDK, utility, CLI tool, or framework extension
  • Set up pyproject.toml, linting, mypy, pre-commit, or GitHub Actions for a Python project
  • Understand versioning (setuptools_scm, PEP 440, semver, static versioning)
  • Understand PyPA specs: py.typed, MANIFEST.in, RECORD, classifiers
  • Publish to PyPI using Trusted Publishing (OIDC) or API tokens
  • Refactor an existing package to follow modern Python packaging standards
  • Add type hints, protocols, ABCs, or dataclasses to a Python library
  • Apply OOP/SOLID design patterns to a Python package
  • Choose between build backends (setuptools, hatchling, flit, poetry)

Also trigger for phrases like: "build a Python SDK", "publish my library", "set up PyPI CI", "create a pip package", "how do I publish to PyPI", "pyproject.toml help", "PEP 561 typed", "setuptools_scm version", "semver Python", "PEP 440", "git tag release", "Trusted Publishing".


2. Package Type Decision

Identify what the user is building before writing any code. Each type has distinct patterns.

Decision Table

Type Core Pattern Entry Point Key Deps Example Packages
Utility library Module of pure functions + helpers Import API only Minimal arrow, humanize, boltons, more-itertools
API client / SDK Class with methods, auth, retry logic Import API only httpx or requests boto3, stripe-python, openai
CLI tool Command functions + argument parser [project.scripts] or [project.entry-points] click or typer black, ruff, httpie, rich

…

자주 묻는 질문

PyPI는 무엇인가요?

PyPI는 Python Package Index의 약자입니다. Python 개발자가 라이브러리(패키지)를 게시하고 공유해, 다른 사람이 설치하고 프로젝트에서 쓸 수 있는 온라인 저장소입니다.

'빌드 백엔드'(setuptools, hatchling, flit, poetry)는 무엇인가요?

Python이 코드를 패키지로 묶어, pip으로 설치하고 PyPI에 게시할 수 있는 형식으로 바꾸는 데 쓰는 서로 다른 도구입니다. 각각 장점이 있습니다.

'타입 힌트'는 무엇인가요?

변수나 함수가 기대하거나 반환하는 데이터 타입을 나타내려고 Python 코드에 추가하는 주석입니다. 오류를 일찍 찾고 코드를 이해하기 쉽게 해 줍니다.

상세 정보

작성자의 원본 설명

End-to-end skill for building, testing, linting, versioning, and publishing a production-grade Python library to PyPI. Covers all four build backends (setuptools+setuptools_scm, hatchling, flit, poetry), PEP 440 versioning, semantic versioning, dynamic git-tag versioning, OOP/SOLID design, type hints (PEP 484/526/544/561), Trusted Publishing (OIDC), and the full PyPA packaging flow. Use for: creat

repo: github/awesome-copilot

인기도

GitHub 스타
40k
순위
#7352
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬