Skip to main content

Simple, Object-Oriented approach to Python CLI apps

Project description

pyCLI is a small library that makes writing command line applications easier. It can take care of command line argument (optparse), environment and configuration file (ConfigParser) parsing; logging (logging); and daemonization (os, sys). It also provides a handy test framework.

pyCLI helps you write well-formed and reusable scripts without having to deal with incompatible interfaces in the Python stdlib.

With PyCLI, a script is as simple as:

def main(app):
    app.log.debug("We're using!")
    if do_stuff():
        return 0
        return 1

if __name__ == "__main__":
    from import LoggingApp
    app = LoggingApp(main)

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 pyCLI, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size pyCLI-0.2.tar.gz (12.6 kB) File type Source Python version None Upload date Hashes View
Filename, size pyCLI-0.2-py2.5.egg (40.2 kB) File type Egg Python version 2.5 Upload date Hashes View

Supported by

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