def __init__(self, **settings): self._logger = get_logger('{}.{}'.format(__name__, self.__class__.__name__)) self._hierarchy_level = len(self.__class__.__mro__) - 1 # Setting for the application. self._settings = settings self._settings['debug'] = False self._listening_addr = '0.0.0.0' self._listening_port = 8888 if 'base_path' not in self._settings: # Get the reference to the calling function current_function = sys._getframe(self._hierarchy_level) caller_function = current_function.f_code reference_to_caller = caller_function.co_filename # Base path self._base_path = os.path.abspath(os.path.dirname(os.path.abspath(reference_to_caller))) self._base_path = 'static_path' in settings and settings['static_path'] or self._base_path self._settings['base_path'] = self._base_path self._base_path = self._settings['base_path'] self._static_routing_setting = dict(path=self._base_path) self._routes = []
def __init__(self): RoutingMap._GUID += 1 self._guid = RoutingMap._GUID self._logger = get_logger('{}.{}'.format(__name__, self.__class__.__name__)) self._sequence = [] self._raw_map = {} self._id_map = {} self._final_sequence = None
def __init__(self, url='sqlite:///:memory:', echo=False): self._logger = get_logger('%s.%s' % (__name__, self.__class__.__name__)) self._echo = echo self._url = url self._engine = None self._session_maker = None self._sessions = {} self._batch_reflected = False self._reflected_entities = []
def __init__(self, locator=None): self.logger = get_logger('{}.{}'.format(__name__, self.__class__.__name__)) self.locator = Locator() self.transformer = Transformer(self.locator) self.assembler = Assembler(self.transformer) self.default_services = [ ('finder', 'tori.common.Finder', [], {}), ('renderer', 'tori.template.service.RenderingService', [], {}), ('db', 'passerine.db.manager.ManagerFactory', [], {}) ] self.cache_map = None self._register_default_services()
def __init__(self, **settings): self._logger = get_logger('{}.{}'.format(__name__, self.__class__.__name__)) self._hierarchy_level = len(self.__class__.__mro__) - 1 self._ioloop = IOLoop.instance() settings.update(self._default_config_tree) # Setting for the application. self._settings = settings self._settings['debug'] = False self._listening_addr = '0.0.0.0' self._listening_port = 8888 if 'base_path' not in self._settings: # Get the reference to the calling function current_function = sys._getframe(self._hierarchy_level) caller_function = current_function.f_code reference_to_caller = caller_function.co_filename # Base path self._base_path = os.path.abspath(os.path.dirname(os.path.abspath(reference_to_caller))) self._base_path = 'static_path' in settings and settings['static_path'] or self._base_path self._settings['base_path'] = self._base_path self._base_path = self._settings['base_path'] self._static_routing_setting = dict(path=self._base_path) self._routes = [] # Enable the reverse reference disabled_core_reference = 'disabled_core_reference' in settings and settings['disabled_core_reference'] if not disabled_core_reference and not centre.core: centre.core = self
def __init__(self): self._logger = get_logger('{}.{}'.format(__name__, self.__class__.__name__)) self._sequence = [] self._raw_map = {} self._id_map = {} self._final_sequence = None