Skip to main content

Automatically add and delete modules to requirements.txt installing them using pip.

Project description

to-requirements.txt | Automatically update requirements.txt

PyPI release Build status Maintainability License

to-requirements.txt allows to automatically manage dependencies in requirements.txt using pip as a package manager.

Demo

Benefits

Easy to setup. The installation process include only two steps: install the package using pip and setup up it using script provided by the package. That's it.

Setup in one command. You can set up VirtualEnv-based project in one command. It will create virtual environment. And install to-requirements.txt automatically.

Customizable. Customize it the way you like: use it only in git repositories, allow or disallow automated requirements.txt file creation, enable or disable the package itself.

Easy to use. After installing the package, running setup command and (optionally) customizing it the package is ready. There is no additional conditions to use. Just install, uninstall or upgrade packages using pip as you usually do.

Always in sync. With to-requirements.txt the project's requirements.txt will always stay in sync with packages that you install using pip.

Installation

To install the package run the following command:

pip install to-requirements.txt

And after that run the command below to initialize the package:

requirements-txt install

It will update your current pip scripts to execute the functionality of this package. Also, if you want to enable all the available functionality of the package you should put the lines below to your .bashrc, .zshrc or other .*rc file:

alias rt=". rt"
alias requirements-txt=". requirements-txt"

Or simply use the cli command:

rt alias

It will enable sourced mode of the cli execution and the cli will be able to activate your virtual environment / deactivate it if required.

The changes made to pip scripts will not affect ordinary pip workflow after uninstalling to-requirements.txt.

Setup project

To set up VirtualEnv based project just type:

requirements-txt init

The same effect could be achieved much easier with aliases:

rt i

Documentation

The detailed documentation is available on requirements-txt.readthedocs.io.

Contributing

Visit the file CONTRIBUTING.md.

License

Visit the file MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

to-requirements.txt-2.0.2.tar.gz (21.8 kB view hashes)

Uploaded Source

Built Distribution

to_requirements.txt-2.0.2-py3-none-any.whl (35.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page