skillfed

dparse

A parser for Python dependency files

dparse v0.6.4 4.7M downloads/30d#2,248 on PyPI64
Permissive license MIT license DORMANT released

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 dparse

uv

uv add dparse

poetry

poetry add dparse

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

parse requirements.txtdependency file parserextract python dependenciespipfile parserpoetry.lock parserconda.yml parserpyproject.toml parser
dependency-managementfile-parsing

More Build Tools packages