Site¶
- 
class dasha.core.Site[source]¶
- Bases: - tollan.utils.namespace.Namespace- This class manages the context of a DashA site, composed of a server and a set of extensions. - It shall be constructed via the - from_*class methods. Two objects are expected:- “server”. This shall be a function that returns the server instance.
- This function optionally may take the site instance as the only argument. 
 
- “extensions”. The shall be a list of items that an
- Extensionobject could be created from.
 
 - Attributes Summary - Methods Summary - from_any(arg)- Create a site from - arg.- from_dict(d, \*\*kwargs)- Construct a - Namespaceinstance from dict.- from_filepath(filepath)- Create a site from a python source file. - from_object(arg)- Create a site from an object that contains the site configurations. - init_app(self)- Initialize server and the extensions. - Attributes Documentation - 
logger= <Logger Site (INFO)>¶
 - Methods Documentation - 
classmethod from_any(arg)[source]¶
- Create a site from - arg.- It checks the value of - argand dispatches to the most probable- from_*factory method.
 - 
classmethod from_dict(d, \*\*kwargs)[source]¶
- Construct a - Namespaceinstance from dict.- This is different from - object_from_dictin that it uses the class attributes as the defaults, thus could behave differently if called from subclasses.- Note - The class attribute settings may be overriden by the content of - dand- kwargs.- Parameters
- *args
- A list of dicts. 
- **kwargs
- Additional keyword arguments that get updated to the dict.