Giter Site home page Giter Site logo

danniyb / poetryize Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thoth2357/poetryize

0.0 0.0 0.0 74 KB

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.

License: MIT License

Python 100.00%

poetryize's Introduction

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

poetryize-demo.mp4

License

This project is licensed under the MIT License.

poetryize's People

Contributors

thoth2357 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.