- Sort Score
- Result 10 results
- Languages All
Results 721 - 730 of 1,977 for Fastapi (0.05 sec)
-
docs_src/app_testing/app_b/main.py
from typing import Union from fastapi import FastAPI, Header, HTTPException from pydantic import BaseModel fake_secret_token = "coneofsilence" fake_db = { "foo": {"id": "foo", "title": "Foo", "description": "There goes my hero"}, "bar": {"id": "bar", "title": "Bar", "description": "The bartenders"}, } app = FastAPI() class Item(BaseModel): id: str title: str description: Union[str, None] = None
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Jan 09 14:44:08 UTC 2024 - 1.1K bytes - Viewed (0) -
docs_src/response_model/tutorial005_py310.py
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float = 10.5 items = { "foo": {"name": "Foo", "price": 50.2}, "bar": {"name": "Bar", "description": "The Bar fighters", "price": 62, "tax": 20.2}, "baz": { "name": "Baz", "description": "There goes my baz",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 816 bytes - Viewed (0) -
docs/em/docs/advanced/async-tests.md
# π π― π βοΈ βͺ π β π― π **FastAPI** πΈ βοΈ π `TestClient`. π π, π βοΈ π΄ π β β π π―, π΅ βοΈ `async` π’. β πͺ βοΈ π π’ π π― πͺ β , πΌ, πβ π π¬ π π½ π. π π π π― π¨ π¨ π FastAPI πΈ & β€΄οΈ β π π π©βπ» βͺ β β π½ π½, βͺ βοΈ π π½ π. β‘οΈ π β π₯ πͺ β π π·. ## pytest.mark.anyio π₯ π₯ π π€ π π’ π π―, π π― π’ βοΈ π. AnyIO π π π π, π β π₯ β π π― π’ π€ π. ## πΈπ²
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3K bytes - Viewed (0) -
tests/test_starlette_exception.py
from fastapi import FastAPI, HTTPException from fastapi.testclient import TestClient from starlette.exceptions import HTTPException as StarletteHTTPException app = FastAPI() items = {"foo": "The Foo Wrestlers"} @app.get("/items/{item_id}") async def read_item(item_id: str): if item_id not in items: raise HTTPException( status_code=404, detail="Item not found",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 7.4K bytes - Viewed (0) -
docs/en/docs/contributing.md
# Development - Contributing First, you might want to see the basic ways to [help FastAPI and get help](help-fastapi.md){.internal-link target=_blank}. ## Developing If you already cloned the <a href="https://github.com/fastapi/fastapi" class="external-link" target="_blank">fastapi repository</a> and you want to deep dive in the code, here are some guidelines to set up your environment. ### Virtual environment
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Aug 25 02:44:06 UTC 2024 - 12.7K bytes - Viewed (0) -
tests/test_datetime_custom_encoder.py
from datetime import datetime, timezone from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel from .utils import needs_pydanticv1, needs_pydanticv2 @needs_pydanticv2 def test_pydanticv2(): from pydantic import field_serializer class ModelWithDatetimeField(BaseModel): dt_field: datetime @field_serializer("dt_field")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.6K bytes - Viewed (0) -
fastapi/datastructures.py
needed for non-async code. Read more about it in the [FastAPI docs for Request Files](https://fastapi.tiangolo.com/tutorial/request-files/). ## Example ```python from typing import Annotated from fastapi import FastAPI, File, UploadFile app = FastAPI() @app.post("/files/") async def create_file(file: Annotated[bytes, File()]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Apr 02 02:48:51 UTC 2024 - 5.6K bytes - Viewed (0) -
docs_src/security/tutorial006.py
from fastapi import Depends, FastAPI from fastapi.security import HTTPBasic, HTTPBasicCredentials app = FastAPI() security = HTTPBasic() @app.get("/users/me") def read_current_user(credentials: HTTPBasicCredentials = Depends(security)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 321 bytes - Viewed (0) -
docs_src/custom_response/tutorial007.py
from fastapi import FastAPI from fastapi.responses import StreamingResponse app = FastAPI() async def fake_video_streamer(): for i in range(10): yield b"some fake video bytes" @app.get("/") async def main():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 277 bytes - Viewed (0) -
docs_src/custom_response/tutorial002.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 352 bytes - Viewed (0)