Skip to main content

A simple command runner

Project description

A simple command runner that uses argparse from the Python standard library under the hood. Python 3 only (3.3 and up).

Basic Usage

Define a command:

from runcommands import command
from runcommands.commands import local

@command
def test(config):
    local(config, 'python -m unittest discover .')

Show its help:

> runcommands test -h
usage: test [-h]

optional arguments:
  -h, --help  show this help message and exit

Run it:

> runcommands test
..........
----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK

See the main documentation for more information on installation, defining & running commands, configuration, etc.

Features

  • Multiple commands can be run in sequence: run --env staging build deploy

  • Commands can be run in a specified environment

  • Built-in help/usage via argparse

  • Command line completion

Documentation

Detailed documentation is on Read the Docs.

License

MIT. See the LICENSE file in the source distribution.

TODO

  • Improve command line completion

  • Add more documentation and examples

  • Write tests

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

runcommands-1.0a22.tar.gz (30.6 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