🔖 Release version 0.113.0

This commit is contained in:
Sebastián Ramírez 2024-09-05 17:25:29 +02:00
parent 179f838c36
commit d86f660302
2 changed files with 26 additions and 1 deletions

View File

@ -7,6 +7,31 @@ hide:
## Latest Changes ## 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 ### Features
* ✨ Add support for Pydantic models in `Form` parameters. PR [#12129](https://github.com/fastapi/fastapi/pull/12129) by [@tiangolo](https://github.com/tiangolo). * ✨ Add support for Pydantic models in `Form` parameters. PR [#12129](https://github.com/fastapi/fastapi/pull/12129) by [@tiangolo](https://github.com/tiangolo).

View File

@ -1,6 +1,6 @@
"""FastAPI framework, high performance, easy to learn, fast to code, ready for production""" """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 from starlette import status as status