poetry
Poetry is a command line tool designed to simplify Python packaging and provide a modern and intuitive build system. It aims to make the process of creating, publishing, and managing Python projects easier and more efficient. With Poetry, developers can easily define project dependencies and manage them using a pyproject.toml file, which includes both direct and transitive dependencies.
The tool also supports virtual environments, allowing developers to create and manage isolated environments for their projects. Poetry automatically installs and manages the dependencies within these environments, making it easier to reproduce and share project setups. It also provides commands for managing package versions, including upgrading and downgrading packages.
Poetry supports various packaging and distribution features like building binary distributions, generating source distributions, and packing projects as wheels. It also includes a comprehensive lock file that tracks the exact versions of all packages used in a project, ensuring reproducibility across different environments.
Another notable feature of Poetry is its integration with package indexes, including the Python Package Index (PyPI). It simplifies the publishing process by providing commands to build and upload packages directly from the command line.
Poetry stands out for its simple and user-friendly interface, making it easy for new and experienced Python developers to manage their projects efficiently. It strives to provide a seamless experience for working with Python packages and dependencies, helping developers focus more on writing code rather than dealing with complex build systems.
List of commands for poetry:
-
poetry:tldr:3a764 poetry: Create a new Poetry project in the directory with a specific name.$ poetry new ${project_name}try on your machineexplain this command
-
poetry:tldr:50c95 poetry: Install a dependency and its subdependencies.$ poetry add ${dependency}try on your machineexplain this command
-
poetry:tldr:527fe poetry: Get the latest version of all dependencies and update `poetry.lock`.$ poetry updatetry on your machineexplain this command
-
poetry:tldr:a6a19 poetry: Execute a command inside the project's virtual environment.$ poetry run ${command}try on your machineexplain this command
-
poetry:tldr:c05dc poetry: Bump the minor version of the project in `pyproject.toml`.$ poetry version minortry on your machineexplain this command
-
poetry:tldr:ce39d poetry: Interactively initialize the current directory as a new Poetry project.$ poetry inittry on your machineexplain this command
-
poetry:tldr:e56df poetry: Install a development dependency and its subdependencies.$ poetry add --group dev ${dependency}try on your machineexplain this command