# coodie

> coodie is a modern Pydantic-based ODM (Object-Document Mapper) for Apache Cassandra and ScyllaDB. It combines the power of Pydantic v2 models with Cassandra's distributed database, offering both sync and async APIs. Think of it as Beanie (MongoDB ODM) but for Cassandra — hence the name: Cassandra + Beanie (hoodie) = coodie.

## Docs

- [Installation](https://scylladb.github.io/coodie/installation.html): How to install coodie and choose a driver
- [Quick Start](https://scylladb.github.io/coodie/quickstart.html): From zero to first query in 60 seconds
- [Defining Documents](https://scylladb.github.io/coodie/guide/defining-documents.html): Document classes, fields, and Pydantic v2 integration
- [Field Types](https://scylladb.github.io/coodie/guide/field-types.html): All supported field types and type annotations
- [Keys and Indexes](https://scylladb.github.io/coodie/guide/keys-and-indexes.html): Primary keys, clustering keys, and secondary indexes
- [CRUD Operations](https://scylladb.github.io/coodie/guide/crud.html): Create, read, update, delete operations
- [Querying](https://scylladb.github.io/coodie/guide/querying.html): QuerySet API and chaining
- [Filtering](https://scylladb.github.io/coodie/guide/filtering.html): Django-style filter lookups
- [Collections](https://scylladb.github.io/coodie/guide/collections.html): List, set, map, and tuple field operations
- [Counters](https://scylladb.github.io/coodie/guide/counters.html): Counter columns with increment/decrement
- [TTL](https://scylladb.github.io/coodie/guide/ttl.html): Time-To-Live support for automatic row expiration
- [LWT](https://scylladb.github.io/coodie/guide/lwt.html): Lightweight Transactions (compare-and-set)
- [Batch Operations](https://scylladb.github.io/coodie/guide/batch-operations.html): Batch CQL statements
- [Sync vs Async](https://scylladb.github.io/coodie/guide/sync-vs-async.html): Dual-stack API comparison
- [Drivers](https://scylladb.github.io/coodie/guide/drivers.html): CassandraDriver, AcsyllaDriver, and initialization
- [Exceptions](https://scylladb.github.io/coodie/guide/exceptions.html): Error handling reference
- [Recipes](https://scylladb.github.io/coodie/guide/recipes.html): Advanced patterns and recipes
- [Integrations](https://scylladb.github.io/coodie/guide/integrations.html): FastAPI and Flask integration examples

## Migration

- [From cqlengine](https://scylladb.github.io/coodie/migration/from-cqlengine.html): Side-by-side migration guide from cqlengine to coodie
- [Argus Example](https://scylladb.github.io/coodie/migration/argus-example.html): Real-world migration case study

## API Reference

- [Document](https://scylladb.github.io/coodie/api/document.html): Document, CounterDocument, and MaterializedView classes
- [QuerySet](https://scylladb.github.io/coodie/api/queryset.html): Chainable query builder API
- [Fields](https://scylladb.github.io/coodie/api/fields.html): PrimaryKey, ClusteringKey, Indexed, Counter, and type markers
- [Types](https://scylladb.github.io/coodie/api/types.html): Python-to-CQL type mapping utilities
- [Drivers](https://scylladb.github.io/coodie/api/drivers.html): Driver registry, AbstractDriver, and CassandraDriver
- [Exceptions](https://scylladb.github.io/coodie/api/exceptions.html): CoodieError hierarchy
- [Results](https://scylladb.github.io/coodie/api/results.html): LWTResult and PagedResult
- [Batch](https://scylladb.github.io/coodie/api/batch.html): BatchQuery and AsyncBatchQuery

## Project

- [GitHub Repository](https://github.com/scylladb/coodie)
- [PyPI Package](https://pypi.org/project/coodie/)
- [Changelog](https://scylladb.github.io/coodie/changelog.html)
- [Contributing](https://scylladb.github.io/coodie/contributing.html)

## Optional

- [llms-full.txt](https://scylladb.github.io/coodie/llms-full.txt): Comprehensive single-file documentation for LLMs
