NEW: Fenrir v1.2.2 is now available — Logo & Favicon Patch! Read the changelog
quick-start.md
docs quick-start.md

Quick Start

Create a simple app.py file:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from fenrir import Fenrir

# Initialize the application
app = Fenrir(title="My First Application", version="1.0.0")

# FastAPI-style routing
@app.get("/")
async def home():
    # Return a simple JSON welcome message
    return {"message": "Welcome to Fenrir!"}

# With path parameters
@app.get("/users/<user_id:int>")
async def get_user(user_id: int):
    return {"user_id": user_id, "name": "John Doe"}

# Falcon-style class-based resource
class ItemResource:
    async def on_get(self, req, resp, item_id: int):
        resp.media = {"item_id": item_id, "status": "active"}

app.add_route("/items/<item_id:int>", ItemResource())

if __name__ == "__main__":
    # Run with: fenrir run app:app
    # Or: python app.py
    app.run()

Run the application:

1
2
3
fenrir run app:app
# or
python app.py

Access the application:

  • App: http://localhost:8000
  • Swagger UI: http://localhost:8000/docs
  • ReDoc: http://localhost:8000/redoc
Edit on GitHub Last Updated: Jun 04, 2026
© 2026 Fenrir Project.
main*
v1.2.2
Ln 1, Col 1
UTF-8
Prettier
Light Mode
Markdown