Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.13.1 instead.
Reason given by maintainers: Included support for Python 3.14 that was not yet ready

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.

Download files

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

Source Distribution

requirements_parser-0.12.0.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

requirements_parser-0.12.0-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file requirements_parser-0.12.0.tar.gz.

File metadata

  • Download URL: requirements_parser-0.12.0.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for requirements_parser-0.12.0.tar.gz
Algorithm Hash digest
SHA256 efc7b899095e2702667830497e307e2d415c9aa7505b5480db7708d67159ea91
MD5 1cb324b6bdf610d6421ab34c99cab7d6
BLAKE2b-256 3edb408c9f7ecea6a1e209665053f28fb06b2eef46ba8d0bdc0ae55ccb0d0279

See more details on using hashes here.

Provenance

The following attestation bundles were made for requirements_parser-0.12.0.tar.gz:

Publisher: deploy.yml on madpah/requirements-parser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file requirements_parser-0.12.0-py3-none-any.whl.

File metadata

File hashes

Hashes for requirements_parser-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7357f5939835418250292184ddeb3cf471e1ac5b1097bd1a69d81276d069381f
MD5 e51f2e2a1fbe2db7b16c82f48b893854
BLAKE2b-256 daf28ce0747de40c3c3153d7e52cea10990639c59b6f65cbd825835a92993cf6

See more details on using hashes here.

Provenance

The following attestation bundles were made for requirements_parser-0.12.0-py3-none-any.whl:

Publisher: deploy.yml on madpah/requirements-parser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.13.1

2 files

0.13.0

2 files

This release

0.12.0 This release

2 files

0.11.0

2 files

0.10.2

2 files

0.10.1

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

1 file

0.0.6

1 file

0.0.4

1 file

0.0.3

1 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