Python `requirements.txt` parser.
# Installation
```bash
$ pip install rparse
```
# Usage
```python
import rparse
requirements = """
flask == 0.10.1
pip >= 6.0.0, < 6.0.7
"""
for requirement in rparse.parse(requirements):
print(requirement.name, requirement.specs)
```
Output will be looks like this:
```python
("flask", [("==", "0.10.1")])
("pip", [(">=", "6.0.0"), ("<", "6.0.7")])
```
`rparse` also have simple command line interface that can be used like this:
```bash
$ cat requirements.txt
flask==0.10.1
raven[flask]>=1.0
$ rparse.py requirements.txt
Package: flask
Version Specifier: [('==', '0.10.1')]
Extras: None
Comment: None
----------------------------------------------------------------
Package: raven
Version Specifier: [('>=', '1.0')]
Extras: ['flask']
Comment: None
----------------------------------------------------------------
```
Metadata
Release files for rparse 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rparse-0.2.0.tar.gz | 3.0 kB | Without provenance | Details for rparse-0.2.0.tar.gz |
Release files / rparse-0.2.0.tar.gz
| Download URL | rparse-0.2.0.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0eb16935b09ad723a12edeb46d48de0ed94dc065aba14307afd50f8bd587e661
|
|
BLAKE2b-256 checksum How to use checksums |
f468f932116c2c788fb6a73c9cd093ddd43f954e57101894ab4b41789d70ad33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for rparse 0.2.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.