Example Scripts
Runnable examples live in docs/examples/ on GitHub. Run any script from the repository root:
python docs/examples/01_connecting.py
Core usage
Script |
Topic |
|---|---|
|
Connect to SQLite, PostgreSQL, MySQL |
|
Select, filter, collect |
|
Async queries |
|
Join patterns |
|
GroupBy and aggregations |
|
Column expressions and functions |
|
|
|
Write CSV, JSON, Parquet |
|
CRUD via |
|
|
|
Window functions |
|
SQL introspection, union semantics |
|
Transactions |
|
Schema reflection |
|
SQLAlchemy model integration |
Interfaces and UX
Script |
Topic |
|---|---|
|
Pandas/Polars wrappers |
|
|
|
Pandas-style API |
|
Polars-style API |
|
SQL output formats |
Integrations
Script |
Topic |
|---|---|
|
SQLAlchemy engine/session |
|
SQLModel / Pydantic |
|
FastAPI |
|
Django |
|
Streamlit |
|
pytest fixtures |
|
Airflow |
|
Prefect |
|
dbt |
Transactions (advanced)
Script |
Topic |
|---|---|
|
Savepoints, isolation, locking |
|
Decorators, hooks, retries, metrics |
Note: Scripts
20and31/32use distinct number ranges. Transaction examples were renumbered to31_*and32_*to avoid colliding with SQLAlchemy/SQLModel integration scripts.
See also the Common Patterns guide and the Quick Start tutorial.