[{"data":1,"prerenderedAt":338},["ShallowReactive",2],{"navigation_docs":3,"-getting-started-introduction":106,"-getting-started-introduction-surround":335},[4,26,57,83],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":25},"Getting Started","i-lucide-rocket","/getting-started","1.getting-started",[10,15,20],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","/getting-started/introduction","1.getting-started/1.introduction","i-lucide-info",{"title":16,"path":17,"stem":18,"icon":19},"Installation","/getting-started/installation","1.getting-started/2.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Quick Start","/getting-started/quick-start","1.getting-started/3.quick-start","i-lucide-play",false,{"title":27,"icon":28,"path":29,"stem":30,"children":31,"page":25},"Core Concepts","i-lucide-book-open","/essentials","2.essentials",[32,37,42,47,52],{"title":33,"path":34,"stem":35,"icon":36},"Models","/essentials/models","2.essentials/1.models","i-lucide-box",{"title":38,"path":39,"stem":40,"icon":41},"Collections","/essentials/collections","2.essentials/2.collections","i-lucide-folder",{"title":43,"path":44,"stem":45,"icon":46},"Views","/essentials/views","2.essentials/3.views","i-lucide-table",{"title":48,"path":49,"stem":50,"icon":51},"Schema Evolution","/essentials/schema-evolution","2.essentials/4.schema-evolution","i-lucide-git-branch",{"title":53,"path":54,"stem":55,"icon":56},"Relations","/essentials/relations","2.essentials/5.relations","i-lucide-link",{"title":58,"icon":59,"path":60,"stem":61,"children":62,"page":25},"Advanced","i-lucide-settings","/advanced","3.advanced",[63,68,73,78],{"title":64,"path":65,"stem":66,"icon":67},"Time-Series","/advanced/time-series","3.advanced/1.time-series","i-lucide-chart-line",{"title":69,"path":70,"stem":71,"icon":72},"Async Support","/advanced/async","3.advanced/2.async","i-lucide-zap",{"title":74,"path":75,"stem":76,"icon":77},"PostgreSQL","/advanced/postgresql","3.advanced/3.postgresql","i-lucide-database",{"title":79,"path":80,"stem":81,"icon":82},"Performance Guide","/advanced/performance","3.advanced/4.performance","i-lucide-gauge",{"title":84,"icon":85,"path":86,"stem":87,"children":88,"page":25},"API Reference","i-lucide-file-code","/api","4.api",[89,94,98,101],{"title":90,"path":91,"stem":92,"icon":93},"Engine","/api/engine","4.api/1.engine","i-lucide-cog",{"title":95,"path":96,"stem":97,"icon":41},"Collection","/api/collection","4.api/2.collection",{"title":33,"path":99,"stem":100,"icon":36},"/api/models","4.api/3.models",{"title":102,"path":103,"stem":104,"icon":105},"Exceptions","/api/exceptions","4.api/4.exceptions","i-lucide-alert-triangle",{"id":107,"title":11,"body":108,"description":328,"extension":329,"links":330,"meta":331,"navigation":332,"path":12,"seo":333,"stem":13,"__hash__":334},"docs/1.getting-started/1.introduction.md",{"type":109,"value":110,"toc":321},"minimark",[111,123,135,160,170,175,178,181,207,210,214,217,242,245,249,286,290,313],[112,113,114,115,122],"p",{},"CentauroDB is a lightweight database wrapper for Python. It stores ",[116,117,121],"a",{"href":118,"rel":119},"https://docs.pydantic.dev/",[120],"nofollow","Pydantic"," models as JSON blobs in SQLite or PostgreSQL and makes them queryable through auto-generated SQL views.",[112,124,125,129,130,134],{},[126,127,128],"strong",{},"The core idea:"," your data is stored as flexible JSON (like a document database), but CentauroDB generates SQL views that extract each field into a queryable column using ",[131,132,133],"code",{},"json_extract()",". You get the flexibility of NoSQL with the query power of SQL.",[112,136,137,140,141,144,145,144,148,151,152,155,156,159],{},[126,138,139],{},"A deliberate design line:"," every CentauroDB query targets a single collection by design — ",[131,142,143],{},"read_objects",", ",[131,146,147],{},"count_objects",[131,149,150],{},"aggregate",", and ",[131,153,154],{},"children_of"," each operate on one ",[131,157,158],{},"{name}_objects"," table per call. Cross-collection JOINs are out of scope intentionally, not deferred: CentauroDB is a document-store-shaped library on top of a relational engine, and we don't compete with relational ORMs on that axis. Users with cross-table-JOIN workloads should reach for SQLAlchemy or SQLModel.",[161,162,167],"pre",{"className":163,"code":165,"language":166},[164],"language-text","┌──────┬──────────┬──────────────────────────────────────────────────────┐\n│  id  │   name   │                    meta (JSON)                       │\n├──────┼──────────┼──────────────────────────────────────────────────────┤\n│  1   │  Sensor  │ {\"unit\":\"C\",\"location\":\"pelion\",\"threshold\":80}      │\n│  2   │  Sensor  │ {\"unit\":\"F\",\"location\":\"olympus\",\"threshold\":200}    │\n└──────┴──────────┴──────────────────────────────────────────────────────┘\n\n        ↓  create_view(\"dashboard\", Sensor)\n\n┌──────┬──────────┬──────┬──────────┬───────────┐\n│  id  │   name   │ unit │ location │ threshold │  ← plain SQL columns\n├──────┼──────────┼──────┼──────────┼───────────┤\n│  1   │  Sensor  │  C   │  pelion  │    80     │\n│  2   │  Sensor  │  F   │  olympus │   200     │\n└──────┴──────────┴──────┴──────────┴───────────┘\n","text",[131,168,165],{"__ignoreMap":169},"",[171,172,174],"h2",{"id":173},"why-zero-migrations","Why zero migrations?",[112,176,177],{},"With a traditional ORM, every schema change requires a migration: generate it, review it, run it in dev, run it in staging, run it in production. Miss a step and your deploy breaks.",[112,179,180],{},"CentauroDB sidesteps this entirely. Because data is stored as JSON, old rows don't need to match the current schema — Pydantic fills in defaults for missing fields and silently ignores removed ones. The result:",[182,183,184,191,197],"ul",{},[185,186,187,190],"li",{},[126,188,189],{},"Add a field"," — give it a default value. Old rows get that default on read. No migration.",[185,192,193,196],{},[126,194,195],{},"Remove a field"," — delete it from your class. Old JSON still has the key, Pydantic ignores it. No migration.",[185,198,199,202,203,206],{},[126,200,201],{},"Rename a field"," — use ",[131,204,205],{},"renamed_from()",". Old JSON reads under the new name. No migration.",[112,208,209],{},"You change your Python class and redeploy. That's it.",[171,211,213],{"id":212},"why-sql-views","Why SQL views?",[112,215,216],{},"JSON flexibility is powerful, but querying raw JSON is clunky. CentauroDB bridges this gap by generating standard SQL views that extract each field into a real column. Once a view exists, you can:",[182,218,219,226,229,232],{},[185,220,221,222,225],{},"Run ",[131,223,224],{},"SELECT * FROM monitoring_view_dashboard WHERE unit = 'Celsius'"," from any SQL tool",[185,227,228],{},"Connect BI dashboards like Metabase or Grafana directly",[185,230,231],{},"Join views with other tables in raw SQL",[185,233,234,235,144,238,241],{},"Use ",[131,236,237],{},"GROUP BY",[131,239,240],{},"ORDER BY",", aggregates — the full SQL language",[112,243,244],{},"Views are virtual — they read live data from the underlying table. No data duplication, no sync lag.",[171,246,248],{"id":247},"what-else-is-built-in","What else is built in?",[250,251,252,263,268,276],"card-group",{},[253,254,255,258,259,262],"card",{"icon":67,"title":64},[131,256,257],{},"TimeSeriesCollection"," stores timestamped values alongside metadata. Access them as a Polars DataFrame with ",[131,260,261],{},".df"," — one line for resampling, rolling averages, or exports.",[253,264,267],{"icon":265,"title":266},"i-simple-icons-pydantic","Pydantic Validation","Every read and write goes through Pydantic v2. Type errors are caught immediately, not silently stored as bad data.",[253,269,271,272,275],{"icon":77,"title":270},"SQLite + PostgreSQL","Start with a zero-config ",[131,273,274],{},".db"," file. Move to PostgreSQL by changing one connection string — same code, same API.",[253,277,278,281,282,285],{"icon":72,"title":69},[131,279,280],{},"AsyncCollection"," and ",[131,283,284],{},"AsyncTimeSeriesCollection"," drop into FastAPI or any async framework without wrapper hacks.",[171,287,289],{"id":288},"requirements","Requirements",[182,291,292,298,304],{},[185,293,294,297],{},[126,295,296],{},"Python"," 3.11+",[185,299,300,303],{},[126,301,302],{},"Runtime dependency:"," Pydantic v2+",[185,305,306,309,310,312],{},[126,307,308],{},"Optional:"," Polars (for ",[131,311,261],{}," property), psycopg (for PostgreSQL)",[314,315,317,318,320],"callout",{"icon":316},"i-lucide-arrow-right","Ready to try it? Head to the ",[116,319,21],{"href":22}," — you'll have a working app in under 5 minutes.",{"title":169,"searchDepth":322,"depth":322,"links":323},2,[324,325,326,327],{"id":173,"depth":322,"text":174},{"id":212,"depth":322,"text":213},{"id":247,"depth":322,"text":248},{"id":288,"depth":322,"text":289},"What is CentauroDB and why does it exist.","md",null,{},{"icon":14},{"title":11,"description":328},"9zOR_RI5L04ZMh3VC5zCRlxg-z08AP_Hs18QkXirBkw",[330,336],{"title":16,"path":17,"stem":18,"description":337,"icon":19,"children":-1},"Install CentauroDB and its optional dependencies.",1781105060349]