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 cli.app!")
    if do_stuff():
        return 0
    else:
        return 1

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

Project details


Download files

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

Source Distribution

pyCLI-0.2.tar.gz (12.6 kB view hashes)

Uploaded Source

Built Distribution

pyCLI-0.2-py2.5.egg (40.2 kB view hashes)

Uploaded Source

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