| Home | Trees | Indices | Help |
|
|---|
|
|
Atom Publising Store loader
Synopsis
--------
The process of creating an Atom Publishing store is
a repetitive task that is common to all projects.
The loader module offers the possibility to automate
this task by putting required information in a
configuration file and let the `loader`function
generates the store from the configuration settings.
Consider the following:
>>> from amplee.loader import loader
>>> service, config = loader('/my/config.cfg')
The ``service`` object returned is an instance of
``amplee.atompub.service.AtomPubService`` and is your
reference to all the related objects.
The ``config`` object is an instance of
``amplee.loader.Config`` and is the representation
of your configuration file.
|
|||
|
Config Represents an INI file as a tree of Config instances Say you have C{test.conf}: [general] verbose = True >>> from amplee.loader import Config >>> config = Config() >>> config.from_ini('test.conf') >>> print config.general.verbose >>> True Each loaded value is an unicode object except the following strings: - 'True' --> True - 'False' --> False - 'None' --> None An empty string will not be transformed into a None though. |
|||
|
|||
| object |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
| tuple |
|
||
|
|||
__doc__ = """Atom Publising Store loa
|
|||
_module_callable_regex = re.compile(r'module:
|
|||
_module_symbol_regex = re.compile(r'module:
|
|||
__warningregistry__ =
|
|||
|
|||
Initializes a storage as described in the configuration object. [svn_storage] repository_uri = file:///var/repo working_copy_path = /home/my/copy username = test password =>>> from amplee.loader import loader, Config >>> conf = Config() >>> conf.from_ini('./my.conf') >>> storage = loader.init_storage(conf, 'svn_storage')
|
|
|
>>> import os >>> from amplee.loader import loader >>> service, conf = loader('./my.conf', base_path=os.getcwd())
|
|
|||
__doc__
|
__warningregistry__
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Sun Feb 17 14:54:45 2008 | http://epydoc.sourceforge.net |