Return an instance of the proper session object.

        :rtype: Session
499127
def _session_start(self):
        
        return self._session_class(self._session_id,
                                   self._session_duration,
                                   self._session_settings)
1071670
def get_session(self):
        
        response = request_access_token(
            grant_type=auth.CLIENT_CREDENTIAL_GRANT,
            client_id=self.client_id,
            client_secret=self.client_secret,
            scopes=self.scopes,
        )

        oauth2credential = OAuth2Credential.make_from_response(
            response=response,
            grant_type=auth.CLIENT_CREDENTIAL_GRANT,
            client_id=self.client_id,
            client_secret=self.client_secret,
        )

        return Session(oauth2credential=oauth2credential)
1117503
def getReadSession(self):
        '''  '''
        if self.ReadSession is None:
            self.ReadSession=scoped_session(sessionmaker(bind=self.engine))

        return self.ReadSession
355926
def get_session(url):
    
    engine = create_engine(url)
    db_session = scoped_session(sessionmaker(engine))
    Base.metadata.create_all(engine)
    return db_session
934346
public function session ()
	{
		
		if (!($this->session instanceof Session))
		{
			$this->session	= Session::singleton ($this->sessionID);
		}
		
		return $this->session;
		
	}
963805
def http_session(self):
        
        if self._http_session is None:
            session = VerboseHTTPSession()
            session.headers.update(self.DEFAULT_HTTP_HEADERS)
            self._http_session = session
        return self._http_session
1295935
def session(self):
        
        if not self._session:
            self._session = requests.Session()
            self._session.headers.update(dict(Authorization='Bearer {0}'.format(self.token)))
        return self._session
503871
def sessions(self):
        
        return pd.to_datetime(
            reduce(
                np.union1d,
                (reader.dates for reader in self._readers.values()),
            ),
            utc=True,
        )
479381
def requests_session(self, *args, **kwargs):
        
        import requests
        auth1 = self.generate_auth()
        return requests.Session(*args, auth=auth1, **kwargs)
353115
def get_session(self, sid, namespace=None):
        
        return self.server.get_session(
            sid, namespace=namespace or self.namespace)
822612
def get_session(account_info):
    
    s = getattr(CONN_CACHE, '%s-session' % account_info['name'], None)
    if s is not None:
        return s
    if account_info.get('role'):
        s = assumed_session(account_info['role'], SESSION_NAME)
    else:
        s = boto3.Session()
    setattr(CONN_CACHE, '%s-session' % account_info['name'], s)
    return s
814990
def session(connection_string=None):
    """"""
    global _session_makers
    connection_string = connection_string or oz.settings["db"]

    if not connection_string in _session_makers:
        _session_makers[connection_string] = sessionmaker(bind=engine(connection_string=connection_string))

    return _session_makers[connection_string]()
230524
def __get_session(self):
        
        db_path = self.__get_config().get(ConfigKeys.asset_allocation_database_path)
        self.session = dal.get_session(db_path)
        return self.session
633009
def init_session(db_url=None, echo=False, engine=None, settings=None):
    
    if engine is None:
        engine = init_engine(db_url=db_url, echo=echo, settings=settings)
    return sessionmaker(bind=engine)
814843
def _create_session(self):
        
        self.driver = requests.Session(**self.driver_args)
        # Set default headers
        self.update_headers(self.current_headers)
        self.update_cookies(self.current_cookies)
        self.set_proxy(self.current_proxy)
1088485
def get_session(db_url):
        # type: (str) -> Session
        
        engine = create_engine(db_url, poolclass=NullPool, echo=False)
        Session = sessionmaker(bind=engine)
        Base.metadata.create_all(engine)
        return Session()
213308
def session(self):
        
        return self.session_class(
            client_key=self.client_key,
            client_secret=self.client_secret,
            signature_method=self.signature_method,
            signature_type=self.signature_type,
            rsa_key=self.rsa_key,
            client_class=self.client_class,
            force_include_body=self.force_include_body,
            blueprint=self,
            base_url=self.base_url,
            **self.kwargs
        )