requirementslib
A tool for converting between pip-style and pipfile requirements.
What it is and what it does
RequirementsLib is a library for parsing and converting between Pipfile and requirements.txt formats. It provides a unified interface to read, write, and manipulate dependency specifications in both formats, making it useful for tools that need to work with multiple dependency declaration styles. The library can also resolve the dependencies of editable packages by introspecting their setup.py or pyproject.toml metadata.
The package was originally built for Pipenv's format conversion needs. It depends on distlib, pep517, pip, platformdirs, plette, pydantic, requests, setuptools, and tomlkit. It supports Python 3.7 through 3.11 and is marked as Production/Stable, but has not been updated since June 2023 and is no longer actively maintained.
Use it for:
- Convert a Pipfile to requirements.txt format for CI/CD pipelines that expect the latter.
- Parse and inspect editable package dependencies without manually reading setup.py files.
- Build a lockfile-based install_requires list for setup.py in a setuptools-based project.
- Programmatically read and modify Pipfile sections (packages, dev-packages, scripts) in Python.
- Extract VCS and path-based requirements from either format for dependency graph analysis.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses, builds, and converts between Pipfile and requirements.txt formats, and resolves dependencies of editable packages.
Yes, with conditions. The package is stable and has no known vulnerabilities, making it safe to use for one-off conversion or parsing tasks. However, it is abandoned (last update June 2023) with 9 runtime dependencies that may drift out of sync with modern Python tooling. Use it if you need Pipfile/requirements.txt interop in a legacy codebase or one-time script, but avoid it for new projects that expect ongoing maintenance or tight integration with current pip/setuptools versions.
Install
requirementslib on PyPI
pip
pip install requirementslibuv
uv add requirementslibpoetry
poetry add requirementslibInstalling requirementslib
Before you install
Low install friction with a pure-Python wheel. However, the package is abandoned—last release was 1153 days ago with no commits since 2023-06-18. It carries 9 runtime dependencies including pydantic, requests, and pip itself, which may introduce transitive maintenance risk.
License in practice
MIT license (permissive) permits commercial and private use with minimal restrictions, requiring only attribution.
Quickstart
from requirementslib import Requirement
r = Requirement.from_line('-e git+https://github.com/pypa/pipenv.git@master#egg=pipenv')
print(r.as_pipfile())
Requires Python >=3.7; editable package dependency resolution via run_requires() may require setuptools and build tools on the system.
Verify before relying
- Whether the package's 9 dependencies (pydantic, requests, pip, setuptools, etc.) are actively maintained and compatible with current Python versions.
- Whether abandonment affects real-world use cases—e.g., if Pipenv itself has moved away from this library.
- Performance or correctness regressions in dependency resolution since the last release.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 9 — distlib, pep517, pip, platformdirs, plette, pydantic, requests, setuptools, tomlkit |
| Maintenance | abandoned — 1,153 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 83,597/month — #14,063 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: requirementslib-3.0.0-py2.py3-none-any.whl
Keywords: pipfile, requirements.txt, pip, requirementslib, pipenv, lockfile, dependency resolver, resolver, dependencies
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
hashinAutomates the process of adding cryptographic…
permissive · top 15,000 on PyPI
pip-requirements-parserParses pip requirements files with the same…
permissive · top 1,000 on PyPI
pipfileProvides a design specification and parser for…
permissive · top 15,000 on PyPI
pipenvPipenv automates Python virtual environment…
permissive · top 1,000 on PyPI
oldest-supported-numpyProvides the oldest version of NumPy compatible…
permissive · top 5,000 on PyPI
pip-upgraderAn interactive CLI tool that upgrades Python…
permissive · top 15,000 on PyPI
plettePlette provides structured parsers and…
permissive · top 15,000 on PyPI
dparse2Parses Python dependency manifests…
permissive · top 15,000 on PyPI
requirements-parserParses pip requirement files into structured…
permissive · top 5,000 on PyPI
dep-logicPerforms logical operations (AND, OR) on PEP…
permissive · top 5,000 on PyPI