- Sort Score
- Result 10 results
- Languages All
Results 521 - 530 of 1,916 for FastApi (0.05 sec)
-
tests/test_response_code_no_body.py
from fastapi import FastAPI from fastapi.responses import JSONResponse from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class JsonApiResponse(JSONResponse): media_type = "application/vnd.api+json" class Error(BaseModel): status: str title: str class JsonApiError(BaseModel): errors: list[Error] @app.get( "/a", status_code=204,
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 3.2K bytes - Viewed (0) -
docs_src/security/tutorial003_py39.py
from typing import Union from fastapi import Depends, FastAPI, HTTPException, status from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm from pydantic import BaseModel fake_users_db = { "johndoe": { "username": "johndoe", "full_name": "John Doe", "email": "******@****.***", "hashed_password": "fakehashedsecret", "disabled": False, }, "alice": {Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 2.4K bytes - Viewed (0) -
docs/pt/docs/advanced/behind-a-proxy.md
``` ### Configurando o `root_path` na aplicação FastAPI { #setting-the-root-path-in-the-fastapi-app } Alternativamente, se você não tiver uma maneira de fornecer uma opção de linha de comando como `--root-path` ou equivalente, você pode definir o parâmetro `root_path` ao criar sua aplicação FastAPI: {* ../../docs_src/behind_a_proxy/tutorial002_py39.py hl[3] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 17.2K bytes - Viewed (0) -
docs/ru/docs/advanced/dataclasses.md
# Использование dataclasses { #using-dataclasses } FastAPI построен поверх **Pydantic**, и я показывал вам, как использовать Pydantic-модели для объявления HTTP-запросов и HTTP-ответов. Но FastAPI также поддерживает использование <a href="https://docs.python.org/3/library/dataclasses.html" class="external-link" target="_blank">`dataclasses`</a> тем же способом: {* ../../docs_src/dataclasses_/tutorial001_py310.py hl[1,6:11,18:19] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 6.6K bytes - Viewed (0) -
docs_src/additional_responses/tutorial003_py39.py
from fastapi import FastAPI from fastapi.responses import JSONResponse from pydantic import BaseModel class Item(BaseModel): id: str value: str class Message(BaseModel): message: str app = FastAPI() @app.get( "/items/{item_id}", response_model=Item, responses={ 404: {"model": Message, "description": "The item was not found"}, 200: {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 837 bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial004_an_py310.py
from typing import Annotated from fastapi import Body, FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None class User(BaseModel): username: str full_name: str | None = None @app.put("/items/{item_id}") async def update_item( *, item_id: int, item: Item,
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 643 bytes - Viewed (0) -
docs_src/dependencies/tutorial003_an_py310.py
from typing import Annotated, Any from fastapi import Depends, FastAPI app = FastAPI() fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] class CommonQueryParams: def __init__(self, q: str | None = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/")Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 655 bytes - Viewed (0) -
tests/test_validate_response_recursive/app.py
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class RecursiveItem(BaseModel): sub_items: list["RecursiveItem"] = [] name: str class RecursiveSubitemInSubmodel(BaseModel): sub_items2: list["RecursiveItemViaSubmodel"] = [] name: str class RecursiveItemViaSubmodel(BaseModel): sub_items1: list[RecursiveSubitemInSubmodel] = [] name: str
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 1.1K bytes - Viewed (0) -
docs/ru/docs/advanced/openapi-webhooks.md
## Документирование вебхуков с помощью FastAPI и OpenAPI { #documenting-webhooks-with-fastapi-and-openapi }Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.9K bytes - Viewed (0) -
tests/test_no_swagger_ui_redirect.py
from fastapi import FastAPI from fastapi.testclient import TestClient app = FastAPI(swagger_ui_oauth2_redirect_url=None) @app.get("/items/") async def read_items(): return {"id": "foo"} client = TestClient(app) def test_swagger_ui(): response = client.get("/docs") assert response.status_code == 200, response.text assert response.headers["content-type"] == "text/html; charset=utf-8"
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Apr 08 04:37:38 UTC 2020 - 786 bytes - Viewed (0)