Skip to main content

easy application construction with easy building blocks

Project description

appspace is a component injection framework that allows any mishmash of Python classes, objects, functions, or modules to be dynamically cobbled together into an application.

An appspaced application is built with an appconf (application configuration) similar to a Django urlconf:

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

Once configured, application components can be accessed as object attributes, dictionary keys, or by calling the component manager directly:

>>> 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.

Files for appspace, version 0.5.4
Filename, size File type Python version Upload date Hashes
Filename, size appspace-0.5.4.tar.bz2 (8.6 kB) File type Source Python version None Upload date Hashes View
Filename, size appspace-0.5.4.tar.gz (9.8 kB) File type Source Python version None Upload date Hashes View
Filename, size appspace-0.5.4.zip (15.0 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