python-modal
Installation
SKILL.md
Quick Reference
| Pattern | Decorator | Use Case |
|---|---|---|
| Simple function | @app.function() |
Stateless compute |
| Class with state | @app.cls() |
ML models, DB connections |
| Web endpoint | @modal.asgi_app() |
FastAPI/Flask APIs |
| Scheduled | @app.function(schedule=...) |
Cron jobs |
| Parallel | .map(), .starmap() |
Batch processing |
When to Use This Skill
Use for Python on Modal:
- Type-safe serverless functions with Pydantic
- Async/await patterns for concurrent operations
- GPU workloads (ML inference, training)
- FastAPI web endpoints
- Scheduled tasks and automation
- Testing Modal functions locally