]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
🔖 Release version 0.113.0 0.113.0
authorSebastián Ramírez <tiangolo@gmail.com>
Thu, 5 Sep 2024 15:25:29 +0000 (17:25 +0200)
committerSebastián Ramírez <tiangolo@gmail.com>
Thu, 5 Sep 2024 15:25:29 +0000 (17:25 +0200)
docs/en/docs/release-notes.md
fastapi/__init__.py

index acf53e3de9e717172ec0dc1feed003d98adab50b..0571523bfe3991499e536df7650ecf38e3cb27ba 100644 (file)
@@ -7,6 +7,31 @@ hide:
 
 ## Latest Changes
 
+## 0.113.0
+
+Now you can declare form fields with Pydantic models:
+
+```python
+from typing import Annotated
+
+from fastapi import FastAPI, Form
+from pydantic import BaseModel
+
+app = FastAPI()
+
+
+class FormData(BaseModel):
+    username: str
+    password: str
+
+
+@app.post("/login/")
+async def login(data: Annotated[FormData, Form()]):
+    return data
+```
+
+Read the new docs: [Form Models](https://fastapi.tiangolo.com/tutorial/request-form-models/).
+
 ### Features
 
 * âœ¨ Add support for Pydantic models in `Form` parameters. PR [#12129](https://github.com/fastapi/fastapi/pull/12129) by [@tiangolo](https://github.com/tiangolo).
index 1e10bf5576a4ea625f7ac33987819a6bce679245..f785f81cd62740c042baf5aecda86adb98f783e4 100644 (file)
@@ -1,6 +1,6 @@
 """FastAPI framework, high performance, easy to learn, fast to code, ready for production"""
 
-__version__ = "0.112.4"
+__version__ = "0.113.0"
 
 from starlette import status as status