Module Import alias Import alias Import alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign AttributeStore NameLoad attr BoolOpOr NameLoad Call NameLoad Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BoolOpOr NameLoad Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Return AttributeLoad NameLoad attr orelse Raise Call NameLoad Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return NameLoad orelse With Call NameLoad NameLoad NameStore body Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str For NameStore NameLoad body If BoolOpAnd CompareIsNot NameLoad NameLoad Call NameLoad NameLoad Str body TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad decorator_list
N/A N/A json N/A uuid N/A logging see.hooks hooks_factory Environment N/A object N/A N/A 
    SEE Environment.

    Given a context factory and the list of the Hooks,
    it sets them up accordingly.

    The Hooks configuration consist in a dictionary or a path to a JSON file.
    The Hooks configuration accepts two fields::
      * configuration: a set of values which will be propagated to all Hooks.
      * hooks: a list of elements containing the instruction for each Hook.
        Each element must contain two fields:
          * name: fully qualified Python name of the Hook class.
          * configuration: configuration values specific to the Hook.
            Any value colliding with the generic configuration
            will overwrite it.

    @param contextfactory: (callable) must return a functional Context object.
    @param configuration: (str|dict) Hooks configuration,
      must be either a dictionary or a path to a JSON file.
    @param identifier: (str) UUID of the Environment,
      a random one will be assigned if not provided.
    @param logger: (logging.Logger) logger object, if not given,
      a default one will be created.

     __init__ N/A N/A self contextfactory configuration identifier logger N/A None None N/A N/A N/A self _identifier N/A identifier N/A str N/A N/A uuid uuid4 N/A N/A self _context None N/A N/A self _hookmanager None N/A N/A self _contextfactory contextfactory N/A N/A self configuration configuration N/A N/A self logger N/A logger N/A N/A logging getLogger N/A %s.%s N/A N/A self __module__ N/A N/A self __class__ __name__ N/A __enter__ N/A N/A self N/A N/A N/A N/A N/A self allocate N/A self N/A __exit__ N/A N/A self N/A args N/A N/A N/A N/A self deallocate N/A identifier N/A N/A self N/A N/A N/A N/A self _identifier N/A property context N/A N/A self N/A N/A N/A Returns the Context if allocated, RuntimeError is raised if not. N/A N/A N/A self _context None N/A N/A N/A self _context N/A N/A N/A RuntimeError Environment not allocated N/A property allocate N/A N/A self N/A N/A N/A Builds the context and the Hooks. N/A N/A N/A N/A self logger debug Allocating environment. N/A N/A N/A self _allocate N/A N/A N/A N/A self logger debug Environment successfully allocated. N/A _allocate N/A N/A self N/A N/A N/A N/A self configuration N/A load_configuration N/A self configuration N/A N/A self _context N/A N/A self _contextfactory N/A self identifier N/A N/A self _hookmanager N/A hooks_factory N/A self identifier N/A self configuration N/A self _context N/A deallocate N/A N/A self N/A N/A N/A Cleans up the context and the Hooks. N/A N/A N/A N/A self logger debug Deallocating environment. N/A N/A N/A self _deallocate N/A N/A N/A N/A self logger debug Environment successfully deallocated. N/A _deallocate N/A N/A self N/A N/A N/A N/A cleanup N/A self logger N/A self _hookmanager N/A self _context N/A N/A self _context None N/A N/A self _hookmanager None N/A N/A load_configuration N/A N/A configuration N/A N/A N/A Returns a dictionary, accepts a dictionary or a path to a JSON file. N/A N/A isinstance configuration dict N/A N/A configuration N/A N/A N/A open configuration configfile N/A N/A N/A N/A json load configfile N/A cleanup N/A N/A logger N/A args N/A N/A Environment's cleanup routine. N/A obj args N/A N/A N/A N/A obj None N/A hasattr obj cleanup N/A N/A N/A N/A N/A N/A obj cleanup N/A N/A N/A NotImplementedError N/A N/A N/A N/A Exception N/A N/A N/A N/A logger exception Unable to cleanup %s object obj N/A