Getting Started¶
Welcome to Cello! An ultra-fast Python web framework, powered by Rust. You'll go from zero to a running API in under 5 minutes. Let's build something incredible.
What You'll Build¶
flowchart LR
A(["pip install\ncello-framework"]) --> B["Create App()"]
B --> C["Register Routes\n@app.get / post / put"]
C --> D["app.run()"]
D --> E(["API live\nlocalhost:8000"])
C -->|"Need auth?"| F["app.use(JwtAuth)"]
C -->|"Need DB?"| G["app.enable_database()"]
C -->|"Group routes?"| H["Blueprint"]
F --> D
G --> D
H --> C
style A fill:#E65100,color:#fff,stroke:none
style E fill:#2E7D32,color:#fff,stroke:none
style F fill:#1565C0,color:#fff,stroke:none
style G fill:#1565C0,color:#fff,stroke:none
style H fill:#6A1B9A,color:#fff,stroke:none By the end of this guide, you'll have a fully functional REST API running at blazing speed:
from cello import App, Response
app = App()
@app.get("/")
def hello(request):
return {"message": "Hello, World!", "framework": "Cello"}
@app.get("/users/{id}")
def get_user(request):
user_id = request.params["id"]
return {"id": user_id, "name": "Jane Doe", "active": True}
@app.post("/users")
def create_user(request):
data = request.json()
return Response.json({"created": True, **data}, status=201)
if __name__ == "__main__":
app.run()
$ python app.py
___ ___| | | ___
/ __/ _ \ | |/ _ \ Cello v1.0.1
| (_| __/ | | (_) | Rust-powered Python Web Framework
\___\___|_|_|\___/
Cello running at http://127.0.0.1:8000
Prerequisites¶
Before you begin
Make sure you have the following installed on your system:
| Requirement | Version | Check Command |
|---|---|---|
| Python | 3.12+ | python --version |
| pip | Latest | pip --version |
| Rust toolchain | Latest (source builds only) | rustc --version |
Python 3.12 Required
Cello uses PyO3 with the abi3-py312 flag. Python 3.11 and earlier are not supported.
Setup in 4 Steps¶
-
Install Cello
Install the framework with a single command.
-
Create Your App
Create a new file and initialize Cello.
-
Add Routes
Define your endpoints with clean decorators.
-
Run It
Start the server and visit your API.
Quick Navigation¶
-
Installation
Detailed installation instructions for all platforms, including virtual environments and troubleshooting.
-
Quick Start
A 5-minute walkthrough that covers routes, requests, responses, and your first working API.
-
First Application
Build a complete REST API step by step with CRUD operations, error handling, and validation.
-
Project Structure
Learn how to organize your Cello project for small scripts, medium apps, and large-scale services.
-
Configuration
Configure your application for development, testing, and production environments.
Next Steps¶
Once you've built your first app, explore these areas to level up:
Join the Cello Community
Have questions? Want to share what you're building? Join the community:
- :material-discord: Discord Server -- Real-time help and discussion
- GitHub Discussions -- Feature requests and Q&A
- Stack Overflow -- Tagged questions and answers
We'd love to hear from you!