Skip to main content

Requirements Parser

shield_pypi-version shield_rtfd shield_gh-workflow-test shield_license


This is a small Python module for parsing Pip requirement files.

The goal is to parse everything in the Pip requirement file format spec.

Installation

pip install requirements-parser

or

poetry add requirements-parser

Examples

requirements-parser can parse a file-like object or a text string.

>>> import requirements
>>> with open('requirements.txt', 'r') as fd:
...     for req in requirements.parse(fd):
...         print(req.name, req.specs)
Django [('>=', '1.11'), ('<', '1.12')]
six [('==', '1.10.0')]

It can handle most (if not all) of the options in requirement files that do not involve traversing the local filesystem. These include:

  • editables (-e git+https://github.com/toastdriven/pyelasticsearch.git]{.title-ref})
  • version control URIs
  • egg hashes and subdirectories ([\#egg=django-haystack&subdirectory=setup]{.title-ref})
  • extras ([DocParser[PDF]]{.title-ref})
  • URLs

Documentation

View the documentation here.

Python Support

We endeavour to support all functionality for all current actively supported Python versions. However, some features may not be possible/present in older Python versions due to their lack of support.

Changelog

See our CHANGELOG.

Contributing

Feel free to open issues, bugreports or pull requests.
See the CONTRIBUTING file for details.

Copyright & License

requirements-parser was originally written by @davidfischer and is now maintained by @madpah. See Authors for full details.

Permission to modify and redistribute is granted under the terms of the Apache 2.0 license.

See the LICENSE file for the full license.

Release files for requirements-parser 0.13.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for requirements-parser 0.13.1
File Size Uploaded
requirements_parser-0.13.1.tar.gz 22.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for requirements-parser 0.13.1
File Interpreter ABI Platform
requirements_parser-0.13.1-py3-none-any.whl Python 3 none any Details

Total release size:37.7 kB

Release files / requirements_parser-0.13.1.tar.gz

Download URL requirements_parser-0.13.1.tar.gz
Size 22.8 kB
Tags Source
SHA-256 checksum
How to use checksums
78811383b2089b6c5197a1431bc2c12ff950245edca39a23eea3460782038dd3
BLAKE2b-256 checksum
How to use checksums
891a5f3c22d38bf1d87d1f4a961489d9eba35c4370a21395562d94410cdd0e73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.

Transparency log

Release files / requirements_parser-0.13.1-py3-none-any.whl

Download URL requirements_parser-0.13.1-py3-none-any.whl
Size 14.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e385663eb32589d16e5b22bb6e5251a57908e73803ffff438b53cd6ea2056e0
BLAKE2b-256 checksum
How to use checksums
bbf915b44d5e4401b0013bbcefe3c09d7bfddcce28cc3d41b1d3077bcedf5b1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.13.1 This release

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.11.0

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

1 release file

0.0.6

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page