PydanTable¶
PydanTable gives you Pydantic-validated tables with a DataFrame API (filter, join, groupby) and a Rust/Polars execution core — so FastAPI services can accept, transform, and return typed columnar data without maintaining parallel pandas and schema definitions.
This site is the full manual; the repository README is the short entrypoint for install one-liners.
See also
Execution builds on Polars (see their user guide) and ships as a native Rust extension. PydanTable adds Pydantic-first schemas, SQLModel-style tabular models, and service / data I/O patterns on top.
Note
Current release: see CHANGELOG — stable 1.x under VERSIONING. Roadmap: ROADMAP; SQLModel milestones: SQLMODEL_SQL_ROADMAP.
Minimal example¶
from pydantable import DataFrameModel
class Sales(DataFrameModel):
id: int
score: float
df = Sales({"id": [1, 2], "score": [10.0, 20.5]})
Choose your path¶
-
Services (FastAPI)
Shortest runnable path, HTTP patterns,
register_exception_handlers(503 / 400 / 422), and cookbooks. Tests:pydantable.testing.fastapi. Troubleshooting: TROUBLESHOOTING. -
Data & I/O
DataFrameModel, lazy vs eager I/O, IO_OVERVIEW, and format guides (Parquet, CSV, SQL, …). Pandas-like helpers: PANDAS_UI. -
Library & contracts
Public API guarantees, VERSIONING, plans/plugins (PLAN_AND_PLUGINS), and custom engine packages (CUSTOM_ENGINE_PACKAGE).
-
Optional engines
SQL (SQL_ENGINE,
pydantable[sql]), Mongo (MONGO_ENGINE,pydantable[mongo]), Spark (SPARK_ENGINE,pydantable[spark]). Beanie: BEANIE. PySpark façade: PYSPARK_UI.
Where pydantable fits¶
- New here? Install → Five-minute tour → Mental model.
- Deciding between tools? Start with Why pydantable? and the Comparisons (Polars + pandas).
- Looking for recipes by intent? See Workflows (cookbook).
Guide map¶
- Services: GOLDEN_PATH_FASTAPI → FASTAPI → FASTAPI_ADVANCED → FASTAPI_ENHANCEMENTS → DATAFRAMEMODEL → EXECUTION. Cookbooks: fastapi_columnar_bodies, fastapi_observability, fastapi_background_tasks, async_lazy_pipeline. Layout:
docs/examples/fastapi/service_layout/. - Data workflows: DATAFRAMEMODEL → IO_DECISION_TREE → IO_OVERVIEW.
- Typing: TYPING — mypy plugin vs Pyright / Pylance / Astral
ty, andas_model(...)on transform chains. - Third-party execution: CUSTOM_ENGINE_PACKAGE. Mongo helpers and Beanie reads/writes: IO_DECISION_TREE and BEANIE.
- Not sure where something lives? DOCS_MAP.