Skip to main content

Tests Coverage Status pre-commit Checked with mypy PyPI - Python Version

Poetryize

Poetryize is a command-line tool built with Typer that facilitates the conversion of requirements.txt files into pyproject.toml files. This allows seamless integration with Poetry, a dependency manager for Python projects. If you've ever found yourself wanting to use Poetry for dependency management but stuck with a project that uses requirements.txt, Poetryize is here to help.

Features

  • Seamless Conversion: Poetryize effortlessly transforms requirements.txt files into pyproject.toml files compatible with Poetry.
  • Dependency Initialization: Poetryize automatically initializes Poetry if a pyproject.toml file is not found in the project, streamlining the conversion process.
  • Error Handling: Poetryize includes error-handling mechanisms to address issues with the specified requirements file, providing informative messages to guide users.
  • Versatile Support: Poetryize supports a range of requirements.txt formats, including:
    • package==version
    • package>=version
    • package<=version
    • package~=version
    • package

Installation

  pip install poetryize

Example/Usage

1. Using Poetryize on project folder with requirements.txt file

├── create_db.py
├── database.py
├── main.py
├── models.py
├── __pycache__
│   ├── database.cpython-310.pyc
│   ├── main.cpython-310.pyc
│   └── models.cpython-310.pyc
├── requirements.txt
└── test_main.http
  • Run poetryize on the project folder, while in the same directory as the requirements.txt file
  poetryize

Note: Using Poetryize without any requirement.txt path argument would automatically use the requirements.txt file in the project folder.

2. Using Poetryize on a project with a requirements.txt file in a different folder

  poetryize /path/to/requirements.txt

Demo

License

This project is licensed under the MIT License.

Metadata

Release files for poetryize 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for poetryize 1.0.1
File Size Uploaded
poetryize-1.0.1.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for poetryize 1.0.1
File Interpreter ABI Platform
poetryize-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / poetryize-1.0.1.tar.gz

Download URL poetryize-1.0.1.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b08894ae58e8955c0f60f6e3d8da92c3d8a79427d93502a2e26e79f282160202
BLAKE2b-256 checksum
How to use checksums
6bbb5a82f0560e27f11a841b7066c4b3e9fdaf702e61f585331e55dd41867141
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.5 Darwin/20.6.0

Release files / poetryize-1.0.1-py3-none-any.whl

Download URL poetryize-1.0.1-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed911cba419eae5a37a8e13e10244bf649c35a98eb60cfc19cf494ef2ebd9232
BLAKE2b-256 checksum
How to use checksums
6da6f72632f61b818936f5fa4560cc83dc97d3bbb90a629a24b94272ea284855
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.5 Darwin/20.6.0

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page