Add session to the container.

        `session`
            Session object
17496
def add(self, session):
        
        self._items[session.session_id] = session

        if session.expiry is not None:
            heappush(self._queue, session)
1075107
def attach_session(self):
        
        assert self.session is None
        root = self.find_root()
        session = self.Session(root)
        root.inject_context(session=session)
        return 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)
414403
private function addSession(Container $container, string $keysession, string $value) : bool
    {
        if ($container->offsetExists($keysession)) {
            return false;
        }

        $container->offsetSet($keysession, $value);

        return true;
    }
928029
def add_packet(packet)
      raise MultiplexedSessionError, 'session is not ready' unless ready?
      raise ArgumentError, 'packet must be instance of Packet' unless packet.is_a?(Packet)

      super(packet)

      pop_all_frames.each {|f| @message_queue.enq f.as_bytes }
    end
255750
public void addSession(String id, Session session) {
    synchronized (session) {
      SessionSchedulable schedulable =
        new SessionSchedulable(session, getType());
      idToSession.put(id, schedulable);
    }
  }
1115215
function Session(identity, connection, options) {
  if (!(this instanceof Session)) {
    return new Session(identity, connection, options);
  }

  assert(identity instanceof Identity, 'Invalid identity supplied');

  if (!(connection instanceof Connection)) {
    options = connection || {};
    options.passive = true;
  }

  this.options = merge(Object.create(Session.DEFAULTS), options);
  this.client = new Client(identity);
  this._identity = identity;

  if (!this.options.passive) {
    this._connection = connection;
    this._connection.open(this._onConnect.bind(this));
  } else {
    this._onConnect();
  }

  if (this.options.subscribe) {
    this.client.on('message', this._onMessage.bind(this)).subscribe();
  }
}
374472
public function loadFromSession()
    {
        $this->session = Instance::ensure($this->session, Session::className());
        if (isset($this->session[$this->cartId]))
            $this->setSerialized($this->session[$this->cartId]);
    }
763367
def add_service(self, cls):
        
        service_name = get_service_name(cls)
        container = self.container_cls(cls, self.config)
        self.service_map[service_name] = container
253369
def add_to(self, container):
        '''
        
        '''
        if self.container:
            self.remove_from(self.container)
        container.add(self)
484799
def copy_session(session: requests.Session) -> requests.Session:
    """"""
    new = requests.Session()
    new.cookies = requests.utils.cookiejar_from_dict(requests.utils.dict_from_cookiejar(session.cookies))
    new.headers = session.headers.copy()
    return new
1148700
def put_object(
        connection, container: str, object_name: str,
        contents, content_type: str) -> None:
    

    connection.put_object(
        container, object_name, contents=contents,
        content_type=content_type)
1258357
def setup_session(endpoint_context, areq, uid, client_id='', acr='', salt='salt',
                  authn_event=None):
    
    if authn_event is None and acr:
        authn_event = AuthnEvent(uid=uid, salt=salt, authn_info=acr,
                                 authn_time=time.time())

    if not client_id:
        client_id = areq['client_id']

    sid = endpoint_context.sdb.create_authz_session(authn_event, areq,
                                                    client_id=client_id,
                                                    uid=uid)
    endpoint_context.sdb.do_sub(sid, uid, '')
    return sid
1296800
void injectSession(Class<?>[] parameterTypes, List<Object> arguments, T session) {
		if (parameterTypes != null) {
			int i = 0;
			for (Class<?> parameterType : parameterTypes) {
				if (parameterType.isInstance(session)) {
					arguments.set(i, session);
					break;
				}
				i++;
			}
		}
	}
1270486
public void addSession(String id, Session session) {
    for (SchedulerForType scheduleThread : schedulersForTypes.values()) {
      scheduleThread.addSession(id, session);
    }
  }
99960
def update_session(request, session_to_set, hproPk):
    """"""

    for key, value in session_to_set.items():
        request.session['plugit_' + str(hproPk) + '_' + key] = value
1213061
def set_session_data(self, session_data):
        '''
        
        '''
        if session_data:
            for field in self._fields:
                if isinstance(field, (Container, Dynamic)):
                    field.set_session_data(session_data)