liveBook · Manning

Session

A session is a bounded interaction context associated with a user, client, or process that may maintain state across related operations or requests.

How 5 Manning books explain it

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.

Read how AI-Powered Search explains session →

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.

Read how Python How-To explains session →

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

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.