dparse
A parser for Python dependency files
What it is and what it does
dparse is a lightweight parser that reads Python dependency declaration files and extracts their contents into a structured, queryable format. It supports a range of common dependency file types—requirements.txt, conda.yml, tox.ini, Pipfile, Pipfile.lock, poetry.lock, and pyproject.toml—though not all support both parsing and updating. The package returns dependency metadata as JSON-serializable objects, including package names, version specifications, hashes, and source information.
You would use dparse when you need to programmatically analyze or manipulate Python dependency files—for example, in a dependency auditing tool, a lock-file validator, or a build system that needs to read and understand what packages a project declares. It handles the parsing complexity so you can work with clean Python objects instead of raw file text.
Use it for:
- Audit Python projects by parsing their dependency files to extract and analyze all declared packages and versions.
- Build a dependency update tool that reads requirements.txt or Pipfile and rewrites them with updated versions.
- Validate lock files (Pipfile.lock, poetry.lock) by parsing them to check for consistency or security issues.
- Integrate dependency parsing into a CI/CD pipeline to extract and report on project dependencies.
- Create a multi-format dependency analyzer that can read conda.yml, tox.ini, and requirements.txt from the same codebase.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses Python dependency files (requirements.txt, conda.yml, tox.ini, Pipfile, poetry.lock, pyproject.toml) and extracts structured dependency information including version specs and hashes.
Yes, if you need to parse Python dependency files programmatically. The package is stable, has low install friction, carries a permissive license, and has no known vulnerabilities. However, be aware that maintenance is dormant (644 days since last release)—it is suitable for stable, read-heavy use cases but may not receive updates for new Python versions or emerging dependency file formats.
Install
dparse on PyPI
pip
pip install dparseuv
uv add dparsepoetry
poetry add dparseInstalling dparse
Before you install
Low install friction with only two runtime dependencies (packaging and tomli). Maintenance is dormant—last release was 644 days ago and the repository shows no recent activity, though it remains archived=false and the package is marked Production/Stable.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely with minimal restrictions, making it safe for both open-source and commercial projects.
Quickstart
from dparse import parse, filetypes
content = "South==1.0.1\npycrypto>=2.6"
df = parse(content, file_type=filetypes.requirements_txt)
print(df.json())
Requires Python 3.7 or later; Python 2.7 is not supported.
Verify before relying
- Whether dormant maintenance (644 days since last release) poses a risk for future Python version compatibility or dependency updates.
- Completeness of parsing for edge cases in supported file formats, particularly conda.yml and Pipfile with complex configurations.
Package facts
| License | MIT license (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — packaging, tomli |
| Maintenance | dormant — 644 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,712,718/month — #2,248 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dparse-0.6.4-py3-none-any.whl
Keywords: dparse
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
dparse2Parses Python dependency manifests…
permissive · top 15,000 on PyPI
requirements-detectorScans a Python project to detect and list its…
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
plettePlette provides structured parsers and…
permissive · top 15,000 on PyPI
requirementslibParses, builds, and converts between Pipfile…
permissive · top 15,000 on PyPI
pip-upgraderAn interactive CLI tool that upgrades Python…
permissive · top 15,000 on PyPI
pip-toolspip-tools provides command-line tools to…
permissive · top 5,000 on PyPI
hashinAutomates the process of adding cryptographic…
permissive · top 15,000 on PyPI
docker-image-pyParses Docker image reference strings into…
permissive · top 5,000 on PyPI