Next Steps¶
Congratulations on completing the tutorial! You now have a solid foundation in Ferro. Here's where to go next based on your goals.
Learn by Use Case¶
Building an API¶
If you're building a REST API with FastAPI, Starlette, or similar:
- Models & Fields — Learn about all field types and constraints
- Relationships — Master one-to-many, one-to-one, and many-to-many
- Queries — Advanced filtering, ordering, and pagination
- How-To: Pagination — Implement efficient pagination
- Transactions — Ensure data consistency
Data Processing¶
If you're processing large datasets or building ETL pipelines:
- Mutations — Bulk operations for high throughput
- Queries — Efficient filtering and aggregation
- Performance — Optimization techniques
- Transactions — Atomic operations
Production Deployment¶
If you're ready to deploy to production:
- Database Setup — Connection pooling and configuration
- Schema Management — Alembic migrations workflow
- How-To: Testing — Build a comprehensive test suite
- How-To: Multiple Databases — Read replicas and sharding
Understanding Internals¶
If you want to understand how Ferro works:
- Architecture — The Rust bridge and data flow
- Identity Map — Instance caching and consistency
- Type Safety — Pydantic integration details
- Performance — Where Ferro is fast and why
Common Patterns¶
Timestamps¶
Add created_at and updated_at to all models:
from datetime import datetime
from ferro import Model, Field
class BaseModel(Model):
created_at: datetime = Field(default_factory=datetime.now)
updated_at: datetime = Field(default_factory=datetime.now)
class User(BaseModel):
username: str
email: str
Soft Deletes¶
Implement "soft delete" pattern:
class User(Model):
username: str
is_deleted: bool = False
deleted_at: datetime | None = None
# Query only non-deleted
active_users = await User.where(User.is_deleted == False).all()
Pagination¶
Implement cursor-based pagination for large datasets:
def paginate_users(after_id: int | None = None, limit: int = 20):
query = User.select()
if after_id:
query = query.where(User.id > after_id)
return query.order_by(User.id).limit(limit)
users = await paginate_users(after_id=100, limit=20).all()
Reference Material¶
API Reference¶
Complete reference for all classes and methods:
User Guide¶
In-depth guides for all features:
Get Help¶
Community¶
- GitHub Discussions: Ask questions, share projects
- Issues: Report bugs or request features
- Contributing: Help improve Ferro
FAQ¶
Common questions and answers:
- How does Ferro compare to SQLAlchemy?
- Do I need to know Rust?
- Can I use Ferro with FastAPI?
- Is Ferro production-ready?
Stay Updated¶
- GitHub: Star syn54x/ferro-orm for updates
- Changelog: Track new features and fixes
- Twitter: Follow @ferroorm for announcements
Start Building¶
The best way to learn is by building something real. Pick a project and dive in!
Need inspiration? Here are some project ideas:
- 📝 Blog Platform — Users, posts, comments, tags
- 🛒 E-commerce API — Products, orders, inventory
- 📊 Analytics Dashboard — Events, metrics, aggregations
- 💬 Chat Application — Users, messages, channels
- 🎫 Ticket System — Issues, comments, attachments
Happy coding with Ferro! 🚀