- Sort Score
- Num 10 results
- Language All
Results 721 - 730 of 1,916 for FastApi (0.04 seconds)
-
docs/en/docs/reference/background.md
You can import it directly from `fastapi`: ```python from fastapi import BackgroundTasks ```
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 377 bytes - Click Count (0) -
docs_src/response_model/tutorial003_py310.py
from typing import Any from fastapi import FastAPI from pydantic import BaseModel, EmailStr app = FastAPI() class UserIn(BaseModel): username: str password: str email: EmailStr full_name: str | None = None class UserOut(BaseModel): username: str email: EmailStr full_name: str | None = None @app.post("/user/", response_model=UserOut) async def create_user(user: UserIn) -> Any:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Jan 07 13:45:48 GMT 2023 - 431 bytes - Click Count (0) -
docs_src/separate_openapi_schemas/tutorial001_py310.py
from fastapi import FastAPI from pydantic import BaseModel class Item(BaseModel): name: str description: str | None = None app = FastAPI() @app.post("/items/") def create_item(item: Item): return item @app.get("/items/") def read_items() -> list[Item]: return [ Item( name="Portal Gun", description="Device to travel through the multi-rick-verse",
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Aug 25 19:10:22 GMT 2023 - 451 bytes - Click Count (0) -
docs_src/body_multiple_params/tutorial005_py39.py
from typing import Union from fastapi import Body, FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None @app.put("/items/{item_id}") async def update_item(item_id: int, item: Item = Body(embed=True)): results = {"item_id": item_id, "item": item}
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 407 bytes - Click Count (0) -
docs_src/custom_response/tutorial009c_py39.py
from typing import Any import orjson from fastapi import FastAPI, Response app = FastAPI() class CustomORJSONResponse(Response): media_type = "application/json" def render(self, content: Any) -> bytes: assert orjson is not None, "orjson must be installed" return orjson.dumps(content, option=orjson.OPT_INDENT_2) @app.get("/", response_class=CustomORJSONResponse) async def main():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 451 bytes - Click Count (0) -
fastapi/responses.py
class UJSONResponse(JSONResponse): """ JSON response using the high-performance ujson library to serialize data to JSON. Read more about it in the [FastAPI docs for Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/). """ def render(self, content: Any) -> bytes: assert ujson is not None, "ujson must be installed to use UJSONResponse"
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Oct 18 12:36:40 GMT 2023 - 1.7K bytes - Click Count (0) -
tests/test_dependency_after_yield_raise.py
from typing import Annotated, Any import pytest from fastapi import Depends, FastAPI, HTTPException from fastapi.testclient import TestClient class CustomError(Exception): pass def catching_dep() -> Any: try: yield "s" except CustomError as err: raise HTTPException(status_code=418, detail="Session error") from err def broken_dep() -> Any: yield "s"
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 1.7K bytes - Click Count (0) -
tests/test_dependency_yield_except_httpexception.py
import pytest from fastapi import Body, Depends, FastAPI, HTTPException from fastapi.testclient import TestClient initial_fake_database = {"rick": "Rick Sanchez"} fake_database = initial_fake_database.copy() initial_state = {"except": False, "finally": False} state = initial_state.copy() app = FastAPI() async def get_database(): temp_database = fake_database.copy() try: yield temp_databaseCreated: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Sep 29 03:29:38 GMT 2025 - 1.9K bytes - Click Count (0) -
docs/es/docs/index.md
# FastAPI { #fastapi } <style> .md-content .md-typeset h1 { display: none; } </style> <p align="center"> <a href="https://fastapi.tiangolo.com/es"><img src="https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png" alt="FastAPI"></a> </p> <p align="center"> FastAPI framework, alto rendimiento, fácil de aprender, rápido de programar, listo para producción </p> <p align="center">Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Dec 16 16:33:45 GMT 2025 - 24.3K bytes - Click Count (0) -
docs/pt/docs/index.md
# FastAPI { #fastapi } <style> .md-content .md-typeset h1 { display: none; } </style> <p align="center"> <a href="https://fastapi.tiangolo.com/pt"><img src="https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png" alt="FastAPI"></a> </p> <p align="center"> Framework FastAPI, alta performance, fácil de aprender, fácil de codar, pronto para produção </p> <p align="center">Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Dec 16 20:32:40 GMT 2025 - 24.5K bytes - Click Count (0)