- Home
- Skills
- Pluginagentmarketplace
- Custom Plugin Python
- Poetry Packaging
poetry-packaging_skill
- Python
3
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill pluginagentmarketplace/custom-plugin-python --skill poetry-packaging- SKILL.md9.1 KB
Overview
This skill teaches modern Python package management and publishing with Poetry. It covers creating projects, managing reproducible dependencies, building distributions, and publishing to TestPyPI/PyPI. You’ll learn project layout, semantic versioning, and workflows for reliable releases.
How this skill works
The skill walks through Poetry commands and pyproject.toml configuration to define metadata, dependency groups, and build settings. It demonstrates dependency resolution, lock file maintenance, virtual environment usage, and building sdist/wheel artifacts. You’ll practice publishing flow, tagging releases, and integrating packaging into CI/CD pipelines.
When to use it
- Starting a new Python library or CLI that you plan to publish
- Standardizing dependency management and reproducible builds across projects
- Preparing packages for PyPI or a private repository
- Implementing CI/CD pipelines for automated releases
- Managing monorepos or projects with multiple dependency groups
Best practices
- Keep pyproject.toml authoritative: declare metadata, dependencies, and scripts there
- Use dependency groups for dev, test, and docs to avoid bloating installs
- Pin or use appropriate version constraints (caret/tilde) and commit poetry.lock for reproducibility
- Test publishing to TestPyPI before releasing to PyPI
- Automate builds and publishes in CI using encrypted PyPI tokens and git tags
Example use cases
- Create a CLI package with Click/Typer, expose entry points, and publish to PyPI
- Develop a reusable library with type hints, tests, and documentation hosted on Read the Docs
- Set up a monorepo with multiple packages, shared dependency groups, and a CI release pipeline
- Build a plugin-based package using entry points and distribute example plugins
- Configure platform-specific dependencies and optional extras for database drivers
FAQ
Build the distribution with poetry build and publish to TestPyPI using a configured test repository, then install via pip from TestPyPI to verify functionality.
Should I commit poetry.lock to version control?
Yes for applications to ensure reproducible installs. For libraries, consider the trade-off: committing helps reproducibility for development but libraries typically rely on broader version ranges for consumers.