🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

Python Intermediate

What is Python Packaging with Poetry?

A modern dependency management and packaging tool for Python that simplifies project setup, versioning, and publishing.

Poetry replaces the fragmented Python packaging toolchain (setup.py, setup.cfg, requirements.txt, pip, virtualenv) with a single tool. It uses pyproject.toml for project metadata and dependency specification, poetry.lock for deterministic builds, and manages virtual environments automatically. Key commands: poetry init (create project), poetry add package (add dependency), poetry install (install from lock file), poetry build (create distribution), poetry publish (upload to PyPI). Poetry resolves dependency conflicts intelligently, supports dependency groups (dev, test), and provides version constraint syntax similar to npm/Composer. It follows PEP 517/518 standards for modern Python packaging.

Related Terms

Python Logging Best Practices
Structured approaches to implementing logging in Python applications using the built-in logging module for debugging and monitoring.
Type Hints
Optional annotations that indicate the expected types of variables, function parameters, and return values.
GIL (Global Interpreter Lock)
A mutex in CPython that allows only one thread to execute Python bytecode at a time, limiting true parallelism.
Comprehension
A concise syntax pattern for creating collections by transforming and filtering items from iterables.
Magic Methods
Special double-underscore methods that define how Python objects behave with built-in operations and functions.
PIP
The standard package installer for Python, used to install and manage third-party libraries from PyPI.
View All Python Terms →