Skip to main content

A framework for simple command-line option parsing.

Project description

Write polished command line applications in a fraction of the time.
Guaranteed, or double your money back!

Compago is a framework for simple command-line parsing in Python. Compago
provides a simple framework and set of decorators to allow you to quickly
and easily define a set of commands within a script. For those familiar with
Ruby's Thor, Compago fills a similar niche.

This project was inspired by the excellent Flask-Script extension for Flask,
but has been entirely rewritten to remove all Flask dependencies.

(see: http://packages.python.org/Flask-Script/)

-----------------------------------------------------------------------------
Quick Start
-----------------------------------------------------------------------------

First, install compago with pip, or alternately fetch the sources from Github or PyPI.

$ pip install compago

Then, create a python file named "mycommand.py" containing this:

import compago

app = compago.Application()

@app.command
def say_hello(to="world"):
print("Hello there, %s" % to)

if __name__ == '__main__': app.run()

Save the file, and run it thusly:

$ python mycommand.py

For some more in-depth examples, see the /examples folder in the sources.

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

compago-1.1.tar.gz (6.8 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