- Sort Score
- Result 10 results
- Languages All
Results 971 - 980 of 1,929 for FastAPI (0.07 sec)
-
docs_src/body_multiple_params/tutorial004_an.py
from typing import Union from fastapi import Body, FastAPI from pydantic import BaseModel from typing_extensions import Annotated app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None class User(BaseModel): username: str full_name: Union[str, None] = None @app.put("/items/{item_id}") async def update_item(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 703 bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial004_an_py39.py
from typing import Annotated, 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 class User(BaseModel): username: str full_name: Union[str, None] = None @app.put("/items/{item_id}") async def update_item( *, item_id: int,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 674 bytes - Viewed (0) -
docs_src/dependencies/tutorial008b.py
from fastapi import Depends, FastAPI, HTTPException app = FastAPI() data = { "plumbus": {"description": "Freshly pickled plumbus", "owner": "Morty"}, "portal-gun": {"description": "Gun to create portals", "owner": "Rick"}, } class OwnerError(Exception): pass def get_username(): try: yield "Rick" except OwnerError as e: raise HTTPException(status_code=400, detail=f"Owner error: {e}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Dec 26 20:37:34 UTC 2023 - 735 bytes - Viewed (0) -
docs_src/dependencies/tutorial008d_an.py
from fastapi import Depends, FastAPI, HTTPException from typing_extensions import Annotated app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("We don't swallow the internal error here, we raise again π") raise @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 744 bytes - Viewed (0) -
docs_src/dependencies/tutorial012_an.py
from fastapi import Depends, FastAPI, Header, HTTPException from typing_extensions import Annotated async def verify_token(x_token: Annotated[str, Header()]): if x_token != "fake-super-secret-token": raise HTTPException(status_code=400, detail="X-Token header invalid") async def verify_key(x_key: Annotated[str, Header()]): if x_key != "fake-super-secret-key": raise HTTPException(status_code=400, detail="X-Key header invalid")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 756 bytes - Viewed (0) -
docs_src/metadata/tutorial001_1.py
from fastapi import FastAPI description = """ ChimichangApp API helps you do awesome stuff. π ## Items You can **read items**. ## Users You will be able to: * **Create users** (_not implemented_). * **Read users** (_not implemented_). """ app = FastAPI( title="ChimichangApp", description=description, summary="Deadpool's favorite app. Nuff said.", version="0.0.1",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 767 bytes - Viewed (0) -
docs_src/path_operation_advanced_configuration/tutorial007.py
from typing import List import yaml from fastapi import FastAPI, HTTPException, Request from pydantic import BaseModel, ValidationError app = FastAPI() class Item(BaseModel): name: str tags: List[str] @app.post( "/items/", openapi_extra={ "requestBody": { "content": {"application/x-yaml": {"schema": Item.model_json_schema()}}, "required": True, }, },
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 822 bytes - Viewed (0) -
docs/de/docs/learn/index.md
# Lernen Hier finden Sie die einfΓΌhrenden Kapitel und Tutorials zum Erlernen von **FastAPI**.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Jan 23 11:22:17 UTC 2024 - 227 bytes - Viewed (0) -
docs_src/security/tutorial005_py39.py
from datetime import datetime, timedelta, timezone from typing import Union import jwt from fastapi import Depends, FastAPI, HTTPException, Security, status from fastapi.security import ( OAuth2PasswordBearer, OAuth2PasswordRequestForm, SecurityScopes, ) from jwt.exceptions import InvalidTokenError from passlib.context import CryptContext from pydantic import BaseModel, ValidationError # to get a string like this run:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 5.2K bytes - Viewed (0) -
docs/ko/docs/advanced/index.md
λ©μΈ [μμ΅μ - μ¬μ©μ μλ΄μ](../tutorial/index.md){.internal-link target=_blank}λ μ¬λ¬λΆμ΄ **FastAPI**μ λͺ¨λ μ£Όμ κΈ°λ₯μ λλ¬λ³΄μκΈ°μ μΆ©λΆν κ²μ λλ€. μ΄μ΄μ§λ μ₯μμλ μ¬λ¬λΆμ΄ λ€λ₯Έ μ΅μ , κ΅¬μ± λ° μΆκ° κΈ°λ₯μ λ³΄μ€ μ μμ΅λλ€. /// tip | "ν" λ€μ μ₯λ€μ΄ **λ°λμ "μ¬ν"**μΈ κ²μ μλλλ€. κ·Έλ¦¬κ³ μ¬λ¬λΆμ μ¬μ© μ¬λ‘μ λν ν΄κ²°μ± μ΄ κ·Έμ€ νλμ μμ μ μμ΅λλ€. /// ## μμ΅μλ₯Ό λ¨Όμ μ½μΌμμμ€ μ¬λ¬λΆμ λ©μΈ [μμ΅μ - μ¬μ©μ μλ΄μ](../tutorial/index.md){.internal-link target=_blank}μ μ§μμΌλ‘ **FastAPI**μ λλΆλΆμ κΈ°λ₯μ μ¬μ©νμ€ μ μμ΅λλ€.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 1.4K bytes - Viewed (0)