Skip to main content

Python requirements tool -- pigar

Project description

What pigar can do?

  • Generate requirements for project, pigar can consider all kinds of complicated situations.

    # Generate requirements.txt for current directory.
    $ pigar
    
    # Generate requirements for given directory in given file.
    $ pigar -p ../dev-requirements.txt -P ../
  • If you do not know the import name belong to which package, such as bs4 may come from beautifulsoup4, MySQLdb may come from MySQL_Python, search it:

    $ pigar -s bs4 MySQLdb
  • Check requirements 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

Installation

Available in Python: 2.7.x, 3.x

[sudo] pip install pigar

Usage

usage: pigar [-h] [-v] [-u] [-s NAME [NAME ...]] [-c [PATH]] [-l LOG_LEVEL]
             [-p SAVE_PATH] [-P PROJECT_PATH]

Python requirements tool -- pigar, it will do only one thing at each time.
Default action is generate requirements.txt in current directory.

optional arguments:
  -h, --help          show this help message and exit
  -v, --version       show pigar version information and exit
  -u, --update        update database, use it when pigar failed you, exit when
                      action done
  -s NAME [NAME ...]  search package name by import name, use it if you do not
                      know import name come from which package, exit when
                      action done
  -c [PATH]           check requirements latest version. If file path not
                      given, search *requirements.txt in current directory, if
                      not found, generate file requirements.txt, exit when
                      action done
  -l LOG_LEVEL        Show given level log messages, argument can be (ERROR,
                      WARNING, INFO, DEBUG), case-insensitive
  -p SAVE_PATH        save requirements in given file path, *used for* default
                      action
  -P PROJECT_PATH     project path, which is directory, *used for* default
                      action

More

Hope pigar is useful to you.

LISENSE

The BSD 3-Clause License

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.5.0-py2.py3-none-any.whl (1.9 MB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for pigar-0.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8dc7ab70304228bed2fefcb72cb866bb884cfaf8e14cad86e9f480cd0cc976fa
MD5 e9c898834af1d3e77267d4e6901d8bef
BLAKE2b-256 ba607a8a64a4dac99ce4603af4a96149504c8d21a825a54bf7ce138982f5a0ea

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