Skip to main content

A fantastic tool to generate requirements for your Python project, and more than that.

Project description

https://img.shields.io/travis/Damnever/pigar.svg?style=flat-square https://img.shields.io/pypi/v/pigar.svg?style=flat-square

Features

  • Generate requirements for project, pigar can consider all kinds of complicated situations. In this project, py2_requirements.txt and py3_requirements.txt for different python versions

    # Generate requirements.txt for current directory.
    $ pigar
    
    # Generate requirements for given directory in given file.
    $ pigar -p ../dev-requirements.txt -P ../

    pigar will list all files which referenced the package, for example:

    # project/foo.py: 2,3
    # project/bar/baz.py: 2,7,8,9
    foobar == 3.3.3

    If requirements file is overwritten over, pigar will show difference between old and new.

  • If you do not know the import name that belongs to a specific package (more generally, does Import Error: xxx drive you crazy?), such as bs4 which may come from beautifulsoup4 or MySQLdb which could come from MySQL_Python, try searching for it:

    $ pigar -s bs4 MySQLdb
  • To check requirements for the latest version, just do:

    # Specific a requirements file.
    $ pigar -c ./requirements.txt
    
    # Or, you can leave pigar search *requirements.txt in current directory
    # level by itself, if not found, pigar will generate requirements.txt
    # for current project then check latest version.
    $ pigar -c

More

You can find more information on GitHub .

Change Logs

Version 0.6.2 (2015.11.5)

  • If requirements file is overwritten over, show difference between old and new.

  • Adjust the structure of the code.

Version 0.6.1 (2015.11.3)

  • Fixed typo.

  • Follow symlinks.

Version 0.6.0 (2015.10.30)

  • Enhancement: issue #7, show imported module come from which files.

  • Consider package installed via Git.

  • Add command “-i”, used to ignore a list of directory.

Version 0.5.5 (2015.10.21)

Version 0.5.2-0.5.4 (2015.10.6)

  • Fixed issue #1.

  • Make version compare more effective.

  • Remove useless code.

Version 0.5.1 (2015.10.1)

  • Available in PYPI(https://pypi-hypernode.com/pypi/pigar).

  • Generate requirements for Python project.

  • Can consider different for different Python versions.

  • Search package names by imported names.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pigar-0.6.2-py2.py3-none-any.whl (2.0 MB view details)

Uploaded Python 2 Python 3

File details

Details for the file pigar-0.6.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pigar-0.6.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 42477c71d07d94c0940f42fe9a47b2c08efc76db4770ef9efd6ab0407ef3976e
MD5 247b51388000d526f801779c5ace8653
BLAKE2b-256 b29cf7a48f10969cba7b1117b70ff1cb59fed6d94d92763aa4d0e731e5d3d5bd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page