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
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 Distributions
appspace-0.1.2.zip
(9.2 kB
view hashes)
appspace-0.1.2.tar.gz
(5.2 kB
view hashes)
appspace-0.1.2.tar.bz2
(5.1 kB
view hashes)
Built Distributions
appspace-0.1.2-py2.7.egg
(15.5 kB
view hashes)
Close
Hashes for appspace-0.1.2.macosx-10.4-x86_64.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | e037bd419e181a90d869d4be5e298393452ca1499893effa04d8f3fc5553082e |
|
MD5 | 979386d2fe6374ca95103a1b4e7e1bf4 |
|
BLAKE2b-256 | 1a8854bd103daf77417e0d65cd544a4946de2ccf30e8a5c4d7cea3310d1410ce |