Session
A session is a bounded interaction context associated with a user, client, or process that may maintain state across related operations or requests.
Build Python Web Apps with Streamlit
st.session_state is Streamlit's session-scoped state store for retaining values across reruns of an app session.
- How it is used
- Keeps interactive app values, such as tasks and widget selections, available across Streamlit reruns.
- How deep it goes
- Explains session lifetime, dictionary-like operations, conditional initialization, and widget assignment order; leaves external persistence for later.
- Examples
- Uses an incrementing counter, a to-do list, dashboard deep links, and simulated movie-search interactions.
- What you can do after
- Build it from scratch with `st.session_state` to retain app values across reruns and initialize them without resetting them.
Read how Build Python Web Apps with Streamlit explains session →
Pro ASP.NET Core 7, Tenth Edition
Session state is client-specific data stored on the server for access across multiple requests within a session.
- How it is used
- Keeps shopping-cart state and other client-specific data available across related requests.
- How deep it goes
- Works through service registration, middleware placement, storage choices, options, keyed access, and commits without detailing cache internals.
- Examples
- Uses a request counter endpoint and a JSON-serialized shopping cart to demonstrate persistence across requests.
- What you can do after
- Operate/configure it to retain per-client values across requests and detect cache-write failures with CommitAsync.
Read how Pro ASP.NET Core 7, Tenth Edition explains session →
AI-Powered Search
A session is a bounded sequence of interactions associated with a user or client context during a period of activity.
- How it is used
- Uses sessions to preserve search context and turn user interactions into signals for relevance learning.
- How deep it goes
- Defines identifier scope and shows session-level click data, but stops short of specifying a universal session-timeout rule.
- Examples
- Uses a Transformers movie query, session 3, ranked documents, click flags, pandas inspection, and CTR aggregation.
- What you can do after
- Apply session records via pandas to inspect interactions and prepare click-based judgments for learning to rank.
Python How-To
Session state is per-session storage that preserves application data across reruns of a web application script.
- How it is used
- Preserves user choices and activity across Streamlit reruns while a browser tab remains active.
- How deep it goes
- Defines key-value storage and demonstrates initialization, updates, filtering state, and menu-based routing.
- Examples
- Uses a task-management app with menu selection, working-task storage, and sorting and filtering dictionaries.
- What you can do after
- Operate/configure Streamlit applications that retain menu, task, sorting, and filtering choices across input-triggered reruns.
MongoDB 8.0 in Action, Third Edition
A client session is an application-created MongoDB session context that groups operations and supports transactions, ordering, and related settings.
- How it is used
- Groups transaction operations while preserving their order, causal relationships, and shared transaction context.
- How deep it goes
- Explains session association, transaction options, cleanup, and labeled-error retries through mongosh and driver examples.
- Examples
- Demonstrates account, customer, and transaction updates using mongosh, Node.js, PyMongo, and Ruby callback APIs.
- What you can do after
- Operate/configure transactions by creating sessions, associating operations, selecting concerns, cleaning up, and handling retries.
Read how MongoDB 8.0 in Action, Third Edition explains session →
Related concepts
- Enter-PSSessionpart of · Enter-PSSession is a PowerShell cmdlet that starts an interactive session with a local or remote computer.
- Invoke-Commandpart of · Invoke-Command is a PowerShell cmdlet that runs commands or scripts on local or remote computers.
- trajectoryhas part · A trajectory is an ordered sequence of states, actions, events, or operations that records or describes progression through successive steps or over time.
- persistent connectionkind of · A persistent connection is a communication link kept open for reuse across multiple messages or operations, rather than reestablished for each exchange.
- dialoguekind of · Dialogue is an ordered exchange of related messages across successive turns between participants or an interactive system and its users.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.




