Skip to main content

Loosely coupled application plumbing

Project description

Allows arbitrary combinations of Python imports to be aggregated into a single application. This application is defined using an application configuration file (“appconf”) similar to Django’s urlconf:

>>> from appspace import patterns
>>> apps = patterns(
...    'helpers',
...    ('square', 'math.sqrt'),
...    ('fabulous', 'math.fabs'),
...    include('subapp', 'foo.bar')
... )

Members of an application objects can be accessed as object attributes, dictionary keys, or through the application object’s __call__ interface:

>>> fab1 = plug.helpers.fabulous
>>> fab2 = plug['helpers']['fabulous']
>>> fab1(2)
2.0
>>> fab2(2)
2.0
>>> plug.helpers.fabulous(2)
2.0
>>> plug('fabulous', 2)
2.0

Project details


Download files

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

Source Distributions

appspace-0.1.zip (9.0 kB view hashes)

Uploaded Source

appspace-0.1.tar.gz (5.1 kB view hashes)

Uploaded Source

appspace-0.1.tar.bz2 (5.0 kB view hashes)

Uploaded Source

Built Distribution

appspace-0.1-py2.7.egg (15.5 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