Skip to main content

A parser for Python dependency files

Project description

Dependency Parser Documentation Status Updates

A parser for Python dependency files

Supported Files

File parse update
requirements.txt yes yes
conda.yml yes yes
tox.ini yes yes
Pipfile yes yes
Pipfile.lock yes yes no (# 2) no (# 2)
zc.buildout no (# 3) no (# 3)
setup.cfg no (# 4) no (# 4)


To install dparse, run:

$ pip install dparse

If you want to update Pipfiles, install the pipenv extra:

$ pip install dparse[pipenv]


To use dparse in a Python project:

from dparse import parse, filetypes

content = """
South==1.0.1 --hash=sha256:abcdefghijklmno

df = parse(content, file_type=filetypes.requirements_txt)


  "file_type": "requirements.txt",
  "content": "\nSouth==1.0.1 --hash=sha256:abcdefghijklmno\npycrypto>=2.6\n",
  "path": null,
  "sha": null,
  "dependencies": [
      "name": "South",
      "specs": [
      "line": "South==1.0.1 --hash=sha256:abcdefghijklmno",
      "source": "pypi",
      "meta": {},
      "line_numbers": null,
      "index_server": null,
      "hashes": [
      "dependency_type": "requirements.txt",
      "extras": []
      "name": "pycrypto",
      "specs": [
      "line": "pycrypto>=2.6",
      "source": "pypi",
      "meta": {},
      "line_numbers": null,
      "index_server": null,
      "hashes": [],
      "dependency_type": "requirements.txt",
      "extras": []


0.5.0 (2020-03-14)

  • Dropped Python 2.7, 3.3, 3.4 support
  • Removed six package
  • Removed pinned dependencies of tests
  • Dropped tests support in favor of tox

0.4.1 (2018-04-06)

  • Fixed a packaging error.

0.4.0 (2018-04-06)

  • pipenv is now an optional dependency that’s only used when updating a Pipfile. Install it with dparse[pipenv]
  • Added support for invalid toml Pipfiles (thanks @pombredanne)

0.3.0 (2018-03-01)

  • Added support for setup.cfg files (thanks @kexepal)
  • Dependencies from Pipfiles now include the section (thanks @paulortman)
  • Multiline requirements are now ignored if they are marked
  • Added experimental support for Pipfiles

0.2.1 (2017-07-19)

  • Internal refactoring

0.2.0 (2017-07-19)

  • Removed setuptools dependency

0.1.1 (2017-07-14)

  • Fixed a bug that was causing the parser to throw errors on invalid requirements.

0.1.0 (2017-07-11)

  • Initial, not much to see here.

Project details

Download files

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

Files for dparse, version 0.5.0
Filename, size File type Python version Upload date Hashes
Filename, size dparse-0.5.0-py3-none-any.whl (11.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size dparse-0.5.0.tar.gz (23.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page