- Sort Score
- Result 10 results
- Languages All
Results 111 - 120 of 1,916 for FastApi (0.26 sec)
-
docs_src/encoder/tutorial001_py310.py
from datetime import datetime from fastapi import FastAPI from fastapi.encoders import jsonable_encoder from pydantic import BaseModel fake_db = {} class Item(BaseModel): title: str timestamp: datetime description: str | None = None app = FastAPI() @app.put("/items/{id}") def update_item(id: str, item: Item): json_compatible_item_data = jsonable_encoder(item)Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 430 bytes - Viewed (0) -
tests/test_return_none_stringified_annotations.py
import http from fastapi import FastAPI from fastapi.testclient import TestClient def test_no_content(): app = FastAPI() @app.get("/no-content", status_code=http.HTTPStatus.NO_CONTENT) def return_no_content() -> "None": return client = TestClient(app) response = client.get("/no-content") assert response.status_code == http.HTTPStatus.NO_CONTENT, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Sep 20 18:44:43 UTC 2025 - 431 bytes - Viewed (0) -
tests/test_security_api_key_query.py
from fastapi import Depends, FastAPI, Security from fastapi.security import APIKeyQuery from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() api_key = APIKeyQuery(name="key") class User(BaseModel): username: str def get_current_user(oauth_header: str = Security(api_key)): user = User(username=oauth_header) return user @app.get("/users/me")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 24 19:03:06 UTC 2025 - 1.9K bytes - Viewed (0) -
tests/test_security_http_basic_realm.py
from base64 import b64encode from fastapi import FastAPI, Security from fastapi.security import HTTPBasic, HTTPBasicCredentials from fastapi.testclient import TestClient app = FastAPI() security = HTTPBasic(realm="simple") @app.get("/users/me") def read_current_user(credentials: HTTPBasicCredentials = Security(security)): return {"username": credentials.username, "password": credentials.password} client = TestClient(app)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 24 19:03:06 UTC 2025 - 2.6K bytes - Viewed (0) -
docs/en/docs/reference/websockets.md
You can import it directly form `fastapi`: ```python from fastapi import WebSocketDisconnect ``` ::: fastapi.WebSocketDisconnect ## WebSockets - additional classes Additional classes for handling WebSockets. Provided directly by Starlette, but you can import it from `fastapi`: ```python from fastapi.websockets import WebSocketDisconnect, WebSocketState ```
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 1.7K bytes - Viewed (0) -
docs_src/pydantic_v1_in_v2/tutorial004_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI from fastapi.temp_pydantic_v1_params import Body from pydantic.v1 import BaseModel class Item(BaseModel): name: str description: Union[str, None] = None size: float app = FastAPI() @app.post("/items/") async def create_item(item: Annotated[Item, Body(embed=True)]) -> Item:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 16:45:54 UTC 2025 - 373 bytes - Viewed (0) -
docs/pt/docs/tutorial/first-steps.md
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 13.6K bytes - Viewed (0) -
docs/es/docs/tutorial/first-steps.md
Despliega tu app en **<a href="https://fastapicloud.com" class="external-link" target="_blank">FastAPI Cloud</a>** con un solo comando: `fastapi deploy`. 🎉 #### Sobre FastAPI Cloud { #about-fastapi-cloud } **<a href="https://fastapicloud.com" class="external-link" target="_blank">FastAPI Cloud</a>** está construido por el mismo autor y equipo detrás de **FastAPI**.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 13.3K bytes - Viewed (0) -
docs/ru/docs/tutorial/handling-errors.md
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 14.1K bytes - Viewed (0) -
tests/test_param_class.py
from typing import Optional from fastapi import FastAPI from fastapi.params import Param from fastapi.testclient import TestClient app = FastAPI() @app.get("/items/") def read_items(q: Optional[str] = Param(default=None)): # type: ignore return {"q": q} client = TestClient(app) def test_default_param_query_none(): response = client.get("/items/") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 636 bytes - Viewed (0)