https://github.com/thoth2357/poetryize
💻 Poetryize: A Typer-based CLI tool that converts requirements.txt to pyproject.toml, streamlining Python dependency management with Poetry. Enhances project maintainability through modern tooling integration.
https://github.com/thoth2357/poetryize
poetry python-tools
Last synced: about 1 year ago
JSON representation
💻 Poetryize: A Typer-based CLI tool that converts requirements.txt to pyproject.toml, streamlining Python dependency management with Poetry. Enhances project maintainability through modern tooling integration.
- Host: GitHub
- URL: https://github.com/thoth2357/poetryize
- Owner: thoth2357
- License: mit
- Created: 2023-11-06T18:28:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-25T12:25:52.000Z (over 2 years ago)
- Last Synced: 2025-04-11T17:52:45.335Z (about 1 year ago)
- Topics: poetry, python-tools
- Language: Python
- Homepage:
- Size: 72.3 KB
- Stars: 16
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/thoth2357/Poetryize/actions/workflows/python-app.yml) [](https://coveralls.io/github/thoth2357/Poetryize?branch=main) [](https://github.com/pre-commit/pre-commit) [](http://mypy-lang.org/) 
# 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
```bash
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
```bash
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
``` bash
poetryize /path/to/requirements.txt
```
## Demo
## License
This project is licensed under the [MIT](https://choosealicense.com/licenses/mit/) License.