- Sort Score
- Result 10 results
- Languages All
Results 581 - 590 of 1,977 for Fastapi (0.07 sec)
-
docs_src/body_multiple_params/tutorial001_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI, Path 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: Annotated[int, Path(title="The ID of the item to get", ge=0, le=1000)], q: Union[str, None] = None,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 610 bytes - Viewed (0) -
docs_src/dependencies/tutorial002_an.py
from typing import Union from fastapi import Depends, FastAPI from typing_extensions import Annotated app = FastAPI() fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] class CommonQueryParams: def __init__(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 706 bytes - Viewed (0) -
docs_src/cookie_params/tutorial001_an_py310.py
from typing import Annotated from fastapi import Cookie, FastAPI app = FastAPI() @app.get("/items/") async def read_items(ads_id: Annotated[str | None, Cookie()] = None):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 205 bytes - Viewed (0) -
docs_src/extra_models/tutorial005.py
from typing import Dict from fastapi import FastAPI app = FastAPI() @app.get("/keyword-weights/", response_model=Dict[str, float]) async def read_keyword_weights():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 205 bytes - Viewed (0) -
docs/en/docs/how-to/configure-swagger-ui.md
To configure them, pass the `swagger_ui_parameters` argument when creating the `FastAPI()` app object or to the `get_swagger_ui_html()` function. `swagger_ui_parameters` receives a dictionary with the configurations passed to Swagger UI directly. FastAPI converts the configurations to **JSON** to make them compatible with JavaScript, as that's what Swagger UI needs. ## Disable Syntax Highlighting
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 26 16:50:52 UTC 2024 - 2.7K 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 Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.8K bytes - Viewed (0) -
tests/test_security_http_base_description.py
from fastapi import FastAPI, Security from fastapi.security.http import HTTPAuthorizationCredentials, HTTPBase from fastapi.testclient import TestClient app = FastAPI() security = HTTPBase(scheme="Other", description="Other Security Scheme") @app.get("/users/me") def read_current_user(credentials: HTTPAuthorizationCredentials = Security(security)): return {"scheme": credentials.scheme, "credentials": credentials.credentials}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.9K bytes - Viewed (0) -
docs_src/header_params/tutorial001_an_py310.py
from typing import Annotated from fastapi import FastAPI, Header app = FastAPI() @app.get("/items/") async def read_items(user_agent: Annotated[str | None, Header()] = None):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 217 bytes - Viewed (0) -
docs_src/cookie_params/tutorial001_an_py39.py
from typing import Annotated, Union from fastapi import Cookie, FastAPI app = FastAPI() @app.get("/items/") async def read_items(ads_id: Annotated[Union[str, None], Cookie()] = None):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 218 bytes - Viewed (0) -
docs/em/docs/advanced/behind-a-proxy.md
```JSON { "message": "Hello World", "root_path": "/api/v1" } ``` ### β `root_path` FastAPI π± π, π₯ π π« βοΈ π π π βΈ π π `--root-path` βοΈ π, π πͺ β `root_path` π’ πβ π π FastAPI π±: ```Python hl_lines="3" {!../../docs_src/behind_a_proxy/tutorial002.py!} ``` πΆββοΈ `root_path` `FastAPI` π π πΆββοΈ `--root-path` π βΈ π Uvicorn βοΈ Hypercorn. ### π `root_path`
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.1K bytes - Viewed (0)