Start api initialization.
179426
async def start(self):
        """"""
        _LOGGER.debug('Initializing pyEight Version: %s', __version__)
        await self.fetch_token()
        if self._token is not None:
            await self.fetch_device_list()
            await self.assign_users()
            return True
        else:
            # We couldn't authenticate
            return False
74081
function initialize() 
	{
		parent::initialize();

		// Provider api end-points
		$this->api->api_base_url  = "https://api.citrixonline.com/";
		$this->api->authorize_url = "https://api.citrixonline.com/oauth/authorize";
		$this->api->token_url     = "https://api.citrixonline.com/oauth/access_token";

        $this->api->curl_authenticate_method  = "GET";
	}
612202
def _start(self):
        """"""
        cls = self._get_manager_class(register_callables=True)
        ins = cls(address=self.addr, authkey=self.authkey)
        ins.start()
        return ins
1171048
def _start(self):
        '''

        '''
        if self.whoami is None:
            me = self.get_me()
            if me.get('ok', False):
                self.whoami = me['result']
            else:
                raise ValueError('Bot Cannot request information, check '
                                 'api_key')
686464
def run_initializer(initializer, initargs):
    """"""
    try:
        initializer(*initargs)
        return True
    except Exception as error:
        logging.exception(error)
        return False
706691
def init_core(app):
    """"""
    from rio import models # noqa
    db.init_app(app)
    celery.init_app(app)
    redis.init_app(app)
    cache.init_app(app)
    sentry.init_app(app)
    graph.init_app(app)
    setup_migrate(app)
    setup_user_manager(app)
1161493
protected function onInit()
    {
        foreach ($this->params as $cName => $cParams) {
            if (gettype($cParams) == "string") {
                $this->params[$cName] = array(
                    "to" => $cParams,
                );
            }
        }
    }
1065104
def init():
    ''''''
    # Load values from config file
    config_file = os.path.realpath(os.path.join(os.getcwd(), 'swaggery.ini'))
    config = configparser.RawConfigParser(allow_no_value=True)
    config.read(config_file)
    log_level = config.get('application', 'logging_level').upper()
    api_dirs = list(config['apis'])
    do_checks = config.get('application',
                           'disable_boot_checks').lower() == 'false'
    # Set logging level
    log.setLevel(getattr(logging, log_level))
    log.debug('Log level set to {}'.format(log_level))
    # Bootstrap application
    log.debug('Exploring directories: {}'.format(api_dirs))
    application = Swaggery(api_dirs=api_dirs, do_checks=do_checks)
    return application
196043
public function initialize()
    {
        parent::initialize();

        $this->responseFormat = [
            'statusKey' => (null !== Configure::read('ApiRequest.responseFormat.statusKey')) ? Configure::read('ApiRequest.responseFormat.statusKey') : 'status',
            'statusOkText' => (null !== Configure::read('ApiRequest.responseFormat.statusOkText')) ? Configure::read('ApiRequest.responseFormat.statusOkText') : 'OK',
            'statusNokText' => (null !== Configure::read('ApiRequest.responseFormat.statusNokText')) ? Configure::read('ApiRequest.responseFormat.statusNokText') : 'NOK',
            'resultKey' => (null !== Configure::read('ApiRequest.responseFormat.resultKey')) ? Configure::read('ApiRequest.responseFormat.resultKey') : 'result',
            'messageKey' => (null !== Configure::read('ApiRequest.responseFormat.messageKey')) ? Configure::read('ApiRequest.responseFormat.messageKey') : 'message',
            'defaultMessageText' => (null !== Configure::read('ApiRequest.responseFormat.defaultMessageText')) ? Configure::read('ApiRequest.responseFormat.defaultMessageText') : 'Empty response!',
            'errorKey' => (null !== Configure::read('ApiRequest.responseFormat.errorKey')) ? Configure::read('ApiRequest.responseFormat.errorKey') : 'error',
            'defaultErrorText' => (null !== Configure::read('ApiRequest.responseFormat.defaultErrorText')) ? Configure::read('ApiRequest.responseFormat.defaultErrorText') : 'Unknown request!'
        ];

        $this->responseStatus = $this->responseFormat['statusOkText'];

        $this->loadComponent('RequestHandler');
        $this->loadComponent('RestApi.AccessControl');
    }
417515
def init_app(self, app):
        """"""
        self.init_config(app)
        state = _OAuthClientState(app)
        app.extensions['invenio-oauthclient'] = state
        return state
1249681
def init(self):
        """"""
        try:
            start_http_server(port=int(self.port), addr=self.host)
        except Exception as e:
            logger.critical("Can not start Prometheus exporter on {}:{} ({})".format(self.host, self.port, e))
            sys.exit(2)
        else:
            logger.info("Start Prometheus exporter on {}:{}".format(self.host, self.port))
112331
def init(scope, app, settings):
    """"""
    cfg = settings.get('rw.static', {})
    static = Static()
    scope['static'] = static
    scope['template_env'].globals['static'] = static
    for base_uri, sources in cfg.items():
        full_paths = []
        for source in sources:
            if isinstance(source, dict):
                full_path = source['path']
                full_paths.append(full_path.format(**os.environ))
                continue
            elif ',' in source:
                module_name, path = [part.strip()
                                     for part in source.split(',')]
            else:
                module_name = source
                path = 'static'
            full_path = pkg_resources.resource_filename(module_name, path)
            full_paths.append(full_path)

        app.root.mount('/' + base_uri + '/<h>/<path:path>',
                       StaticHandler, {'path': full_paths},
                       name='static_' + base_uri.replace('.', '_'))

        static.handlers.append((base_uri, StaticHandler, full_paths))
    static.setup()
512759
def _init(self):
        """"""
        # Note that we assume params.json was already created by JsonLogger
        progress_file = os.path.join(self.logdir, "progress.csv")
        self._continuing = os.path.exists(progress_file)
        self._file = open(progress_file, "a")
        self._csv_out = None
56980
def __initialize(self, resp):
        """"""

        raw_data = xmltodict.parse(resp.content)
        root_key = list(raw_data.keys())[0]
        self.raw_data = raw_data.get(root_key)
        self.__initializeFromRaw()
1178947
def start(self):
        """"""
        if self._is_already_running():
            LOGGER.error('Is already running')
            sys.exit(1)
        try:
            self._daemonize()
            self.controller.start()
        except Exception as error:
            sys.stderr.write('\nERROR: Startup of %s Failed\n.' %
                             sys.argv[0].split('/')[-1])
            exception_log = self._get_exception_log_path()
            if exception_log:
                with open(exception_log, 'a') as handle:
                    timestamp = datetime.datetime.now().isoformat()
                    handle.write('{:->80}\n'.format(' [START]'))
                    handle.write('%s Exception [%s]\n' % (sys.argv[0],
                                                          timestamp))
                    handle.write('{:->80}\n'.format(' [INFO]'))
                    handle.write('Interpreter: %s\n' % sys.executable)
                    handle.write('CLI arguments: %s\n' % ' '.join(sys.argv))
                    handle.write('Exception: %s\n' % error)
                    handle.write('Traceback:\n')
                    output = traceback.format_exception(*sys.exc_info())
                    _dev_null = [(handle.write(line),
                                 sys.stdout.write(line)) for line in output]
                    handle.write('{:->80}\n'.format(' [END]'))
                    handle.flush()
                sys.stderr.write('\nException log: %s\n\n' % exception_log)
            sys.exit(1)
687908
def _initialize(self):
        """"""

        payload = {
            'apikey': self.session.cookies.get('apikey'),
            'source': self.session.cookies.get('source')
            }

        if self.fm_user.logged_in:
            payload['logintoken'] = self.session.cookies.get('logintoken')

        payload.update(self.transfer_info)

        method, url = get_URL('init')

        res = getattr(self.session, method)(url, params=payload)

        if res.status_code == 200:
            for key in ['transferid', 'transferkey', 'transferurl']:
                self.transfer_info[key] = res.json().get(key)

        else:
            hellraiser(res)
681992
def init_app(self, app):
        """"""
        self.init_config(app)
        self.cache = Cache(app)
        self.is_authenticated_callback = _callback_factory(
            app.config['CACHE_IS_AUTHENTICATED_CALLBACK'])
        app.extensions['invenio-cache'] = self