SQLAlchemy
SQLAlchemy is a Python SQL toolkit and object-relational mapping library for connecting to and working with relational databases.
The Well-Grounded Python Developer: How the pros use Python and Flask
SQLAlchemy is a Python SQL toolkit and object-relational mapping library for working with relational databases.
- How it is used
- Uses SQLAlchemy to persist application data and work with related database records as Python objects.
- How deep it goes
- Explains ORM benefits and class-based models through application examples; defers detailed SQLAlchemy treatment during the initial authentication setup.
- Examples
- Uses invoice data, SQLite-backed user records, and a parent-child post model to illustrate mapping and persistence.
- What you can do after
- Apply it via Flask-SQLAlchemy to define database models and work with persistent, related records in Python.
Read how The Well-Grounded Python Developer: How the pros use Python and Flask explains SQLAlchemy →
Build Python Web Apps with Streamlit
SQLAlchemy is a Python database toolkit and object-relational mapping library that provides database connectivity, SQL execution, and transaction management.
- How it is used
- Connects a Streamlit CRUD app to PostgreSQL for Python-driven queries and changes.
- How deep it goes
- Shows SQLAlchemy through `st.connection`, `text()`, and sessions, without developing SQLAlchemy internals.
- Examples
- Uses a `Database` class and a `SELECT` query whose rows appear in Streamlit.
- What you can do after
- Apply it via Streamlit’s `st.connection` to execute queries and commit or roll back writes.
Read how Build Python Web Apps with Streamlit explains SQLAlchemy →
Build Financial Software with Generative AI (From Scratch)
SQLAlchemy is a Python library and ORM toolkit for working with relational databases through SQL expressions and mapped objects.
- How it is used
- Simplifies relational-database code while fitting testing, table design, and API construction into an ACH-file workflow.
- How deep it goes
- Contrasts ORM benefits and limitations with direct SQL but stops short of detailed SQLAlchemy implementation.
- Examples
- Uses an ACH-file schema, PlantUML table definition, and table-relationship diagram as concrete design artifacts.
- What you can do after
- Apply it via SQLAlchemy after comparing direct SQL, project standards, query complexity, and maintenance costs.
Read how Build Financial Software with Generative AI (From Scratch) explains SQLAlchemy →
The Quick Python Book, Fourth Edition
SQLAlchemy is a Python SQL toolkit and object-relational mapping library for connecting to and working with relational databases.
- How it is used
- Automates database tasks while providing Python object interfaces and continued access to SQL.
- How deep it goes
- Demonstrates setup and basic CRUD through tables and declarative objects, without descending into ORM internals.
- Examples
- Uses a SQLite people table to insert, query, filter, update, add, modify, and delete records.
- What you can do after
- Apply it via engines, sessions, table definitions, and declarative classes to perform relational database CRUD.
Read how The Quick Python Book, Fourth Edition explains SQLAlchemy →
Related concepts
- object-relational mapperkind of · An object-relational mapper is software that maps programming-language objects and operations to relational database structures and operations.
- Apache Airflowused by · Apache Airflow is an open-source platform for authoring, scheduling, and monitoring programmatically defined workflows, commonly represented as directed acyclic graphs.
- sqlite3alternative to · sqlite3 is Python’s standard-library module providing an interface for creating, accessing, querying, and manipulating SQLite databases without a separate server.
- librarykind of · A software library is a reusable collection of code or components that other programs can incorporate or invoke to provide functionality.
- Alembicused by · Alembic is a Python database migration tool commonly used with SQLAlchemy to manage versioned schema changes.
- Apache Supersetused by · Apache Superset is an open-source web-based platform for exploring, querying, and visualizing data from multiple databases.
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.



