Core Concepts
This section covers the fundamental building blocks of Ryx.
What You'll Learn
- Models — Define database tables as Python classes
- Managers & QuerySets — The query API engine
- Fields — 30+ column types with validation
- Migrations — Schema evolution, automated
The Big Picture
# 1. Define a model (maps to a table)
class Post(Model):
title = CharField(max_length=200)
views = IntField(default=0)
# 2. Access via Manager
Post.objects # → Manager
# 3. Build queries with QuerySet
Post.objects.filter(active=True) # → QuerySet (lazy)
# 4. Execute
await Post.objects.filter(active=True) # → [Post, Post, ...]