Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!
Project Description

QuickApp is a library that composes the functionality of Compmake, Reprep in high-level constructs for extremely rapid development of scientific applications.

Simplest QuickApp application

This is an example of the simplest QuickApp application. It does not use Compmake functionality.

from quickapp import QuickAppBase

class VideoMaker(QuickAppBase):
    """ Basic example of a QuickApp (no Compmake support) """
    def define_program_options(self, params):
        params.add_int('param_name', default=1)

    def go(self):
        self.info('you passed: %s' % self.get_options().param_name)

main = VideoMaker.get_sys_main()

Here’s an example that uses Compmake to define jobs:

#!/usr/bin/env python
from quickapp import QuickApp

class AppExample(QuickApp):
    """ Simplest app example """

    def define_options(self, params):
        params.add_int('x', default=1)

    def define_jobs_context(self, context):
        options = self.get_options()
        # create a job
        context.comp(f, options.x)

def f(x):
    print('x = %s' % x)

app_example_main = AppExample.get_sys_main()

if __name__ == '__main__':
    app_example_main()

QuickApp with subcommands

Define the parent app by deriving from QuickMultiCmdApp:

class DemoApp(QuickMultiCmdApp):
    cmd = 'dp'

    def define_multicmd_options(self, params):
        params.add_string('config', help='Config Joint')
        params.add_int('param2', help='Second parameter')

    def initial_setup(self):
        options = self.get_options()
        self.info('Loading configuration from %r.' % options.config)
        self.info('My param2 is %r.' % options.param2)

main_func = DemoApp.

Define the subapps by deriving from DemoApp.get_sub():

class DemoAppCmd1(QuickApp, DemoApp.get_sub()):
    cmd = 'cmd1'
    short = 'First command'

    def define_options(self, params):
        params.add_int('param1', help='First parameter', default=1)
        params.add_int('param2', help='Second parameter')

    def define_jobs(self, context):
        options = self.get_options()
        self.info('My param2 is %r.' % options.param2)
Release History

Release History

This version
History Node

1.3.8

History Node

1.3.7

History Node

1.3.5

History Node

1.3.3

History Node

1.3.2

History Node

1.2.7

History Node

1.2.6

History Node

1.2.5

History Node

1.2.4

History Node

1.2.3

History Node

1.2.2

History Node

1.2.1

History Node

1.2

History Node

1.1.dev1

History Node

1.1dev1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
QuickApp-1.3.8.tar.gz (43.7 kB) Copy SHA256 Checksum SHA256 Source Sep 7, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting