Registry / devops / to-requirements-txt

to-requirements-txt

JSON →
library2.0.14pypypiunverified

Automatically add and delete modules from requirements.txt when installing or uninstalling with pip. Current version: 2.0.14. Releases are monthly.

pip install to-requirements-txt
INSTALL
IMPORT
SIG · TO-REQUIREMENTS-TX
T
to-requirements-txt
devopspythonv2.0.14
Install
1.8s avg
Import
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.0.14 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.8s · import 0.000s · 20MB
18MB installed
● package 18MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

to-requirements-txt
No explicit import — the package works via pip plugins.
import to_requirements_txt
This is a pip plugin, not a regular Python module. Importing it does nothing.

The tool hooks into pip install/uninstall and automatically syncs requirements.txt.

# After installation, pip operations automatically update requirements.txt # Example: pip install requests # adds requests to requirements.txt # Example: pip uninstall requests # removes requests from requirements.txt # To disable temporarily: pip install --no-reqs-update requests
to-requirements-txt --version
Debug
Known issues
gotchaThe package is a pip plugin and does not work with pipx or virtual environments that use different pip paths.
fix
Run pip install/uninstall in the same environment where the package is installed (e.g., same virtualenv).
affects: all
gotchaIt can create duplicate entries if you manually edit requirements.txt then pip install.
fix
Use `pip install --no-reqs-update` to skip auto-update, or clean up manually.
affects: all
deprecatedThe command-line tool 'to-requirements-txt' (as a script) is deprecated; only the pip plugin is maintained.
fix
Use pip install/uninstall normally; the plugin works automatically.
affects: >=2.0.0
gotchaIf you uninstall this package itself, it may also be removed from requirements.txt.
fix
Disable auto-update with `pip install --no-reqs-update to-requirements-txt` before uninstalling.
affects: all
Upgrade
Version history
2.0.14latest on PyPI · released May 3, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
to-requirements-txt — pip install to-requirements-txt · libregistry