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, ...]