Skip to main content

A framework for command-line apps with multiple commands.

Project description

MultiApp is a framework so that you can give your applications a quick and easy way to have multiple functions at the command line. It’s simple to use - you just create a subclass of MultiApp like this:

class FileStamper(MultiApp):
    '''
FileStamper will manipulate logfiles in a special format. It is blah blah
blah...(more long description)
    '''
    name = "FileStamper"
    version = "1.0"
    shortdesc = "A logging package."

    def do_log(self, file, message):   # User types log at the prompt
        # Add the message to the log...
    do_log.usage = "FILENAME MESSAGE"
    do_log.descr = "Adds a new entry to the log file."

    def do_latest_entry(self, file, number=5): # User types latest-entry
        # Retrieve the latest log message...
    do_latest_entry.usage = "FILENAME [NUMBER]"
    do_latest_entry.descr = "Retrieves the log's latest entry."

MultiApp provides your program with:

  • Argument parsing that you can just treat like normal method arguments

  • Integrated help system that works out of the box

  • Very unobtrusive ways to define functionality

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

MultiApp-1.0.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file MultiApp-1.0.tar.gz.

File metadata

  • Download URL: MultiApp-1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for MultiApp-1.0.tar.gz
Algorithm Hash digest
SHA256 ad854b9526ddd04e43b00372e34e04e7e736b6aa2a842be6b47d9afb604e393f
MD5 51bd7cd54d6f7808a096c13cf4f130c5
BLAKE2b-256 0c2facdfb5e2a2e6b7a5e4f3c80bd10f3d6c6ed00a79cfd885103b85ee804990

See more details on using hashes here.

Provenance

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