Skip to main content

Lightweight command-line parsing via a decorator

Project description

parsable.py is a super lightweight set of decorators that lets you add
command-line parsing to scripts with minimal effort.

How To Use parsable.py:

1. copy parsable.py into your project and

import parsable

2. decorate functions you want parsed as follows

@parsable.command
def my_function (required_arg, optional_arg = 1):
'Help messages are not just a good idea --they are required'
...

3. finish the script with

if __name__ == '__parsable__': parsable.dispatch()

That's it: 3 short lines of syntax!

LICENSE: dual MIT / GPL2

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 parsable, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size parsable-0.1.0.tar.gz (2.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page