From b1ab12dc25e4e2bc0f70026f74ca0cf133d69089 Mon Sep 17 00:00:00 2001 From: tarsil Date: Fri, 12 Jul 2024 13:19:36 +0100 Subject: [PATCH] Release 0.9.0 --- docs/en/docs/release-notes.md | 32 ++++++++++++++++++++++++++++++++ lilya/__init__.py | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index b38050b..5ade108 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -5,6 +5,38 @@ hide: # Release Notes +### 0.9.0 + +### Added + +- The new possibility of decalring routes using lilya as decorator. + +#### Example + +```python +from lilya.apps import Lilya +from lilya.requests import Request +from lilya.responses import Ok + +app = Lilya() + + +@app.get("/") +async def welcome(): + return Ok({"message": "Welcome to Lilya"}) + + +@app.get("/{user}") +async def user(user: str): + return Ok({"message": f"Welcome to Lilya, {user}"}) + + +@app.get("/in-request/{user}") +async def user_in_request(request: Request): + user = request.path_params["user"] + return Ok({"message": f"Welcome to Lilya, {user}"}) +``` + ### 0.8.3 ### Changed diff --git a/lilya/__init__.py b/lilya/__init__.py index 732155f..3e2f46a 100644 --- a/lilya/__init__.py +++ b/lilya/__init__.py @@ -1 +1 @@ -__version__ = "0.8.3" +__version__ = "0.9.0"