Metadata-Version: 2.1
Name: poetryize
Version: 1.0.1
Summary: A script that utilized typer, rich to create a tool that converts requirements.txt to be compatible with poetry
Home-page: https://github.com/thoth2357/poetryize
License: MIT
Author: thoth2357
Author-email: thoth2357@gmail.com
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: aiohttp (==3.8.4)
Requires-Dist: aiosignal (==1.3.1)
Requires-Dist: annotated-types (==0.5.0)
Requires-Dist: asgiref (==3.7.2)
Requires-Dist: async-timeout (==4.0.2)
Requires-Dist: asyncio (==3.4.3)
Requires-Dist: rich (>=13.6.0,<14.0.0)
Requires-Dist: typer[all] (>=0.9.0,<0.10.0)
Project-URL: Repository, https://github.com/thoth2357/poetryize
Description-Content-Type: text/markdown

[![Tests](https://github.com/thoth2357/Poetryize/actions/workflows/python-app.yml/badge.svg)](https://github.com/thoth2357/Poetryize/actions/workflows/python-app.yml) [![Coverage Status](https://coveralls.io/repos/github/thoth2357/Poetryize/badge.svg?branch=main)](https://coveralls.io/github/thoth2357/Poetryize?branch=main) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit) [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/Poetryize)

# 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
<video src='https://github.com/thoth2357/Poetryize/assets/98170427/b2a72dad-c484-4cbf-b4c4-2923eb4be59a' height=50></video>

## License
This project is licensed under the [MIT](https://choosealicense.com/licenses/mit/) License.

