- Sort Score
- Result 10 results
- Languages All
Results 511 - 520 of 1,086 for str (0.07 sec)
-
docs_src/python_types/tutorial009c_py310.py
def say_hi(name: str | None):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 56 bytes - Viewed (0) -
tests/test_webhooks_security.py
app = FastAPI() bearer_scheme = HTTPBearer() class Subscription(BaseModel): username: str monthly_fee: float start_date: datetime @app.webhooks.post("new-subscription") def new_subscription( body: Subscription, token: Annotated[str, Security(bearer_scheme)] ): """ When a new user subscribes to your service we'll send you a POST request with this
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Oct 20 09:00:44 UTC 2023 - 4.6K bytes - Viewed (0) -
tests/test_openapi_examples.py
from dirty_equals import IsDict from fastapi import Body, Cookie, FastAPI, Header, Path, Query from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class Item(BaseModel): data: str @app.post("/examples/") def examples( item: Item = Body( examples=[ {"data": "Data in Body examples, example1"}, ], openapi_examples={ "Example One": {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Sep 06 15:57:43 UTC 2024 - 17.7K bytes - Viewed (0) -
docs/pt/docs/tutorial/request-files.md
### `UploadFile` `UploadFile` tem os seguintes atributos: * `filename`: Uma `str` com o nome do arquivo original que foi enviado (por exemplo, `myimage.jpg`). * `content_type`: Uma `str` com o tipo de conteúdo (tipo MIME / tipo de mídia) (por exemplo, `image/jpeg`).
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 30 19:52:32 UTC 2024 - 7.8K bytes - Viewed (0) -
lib/wasm/wasm_exec.js
sp >>>= 0; const str = encoder.encode(String(loadValue(sp + 8))); storeValue(sp + 16, str); setInt64(sp + 24, str.length); }, // valueLoadString(v ref, b []byte) "syscall/js.valueLoadString": (sp) => { sp >>>= 0; const str = loadValue(sp + 8); loadSlice(sp + 16).set(str); }, // func valueInstanceOf(v ref, t ref) bool
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Aug 30 19:15:21 UTC 2024 - 16.5K bytes - Viewed (0) -
fastapi/security/base.py
from fastapi.openapi.models import SecurityBase as SecurityBaseModel class SecurityBase: model: SecurityBaseModel
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Dec 07 15:12:16 UTC 2018 - 141 bytes - Viewed (0) -
docs_src/schema_extra_example/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 @app.put("/items/{item_id}") async def update_item( *, item_id: int, item: Annotated[ Item, Body(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jul 01 16:43:29 UTC 2023 - 965 bytes - Viewed (0) -
docs_src/additional_status_codes/tutorial001_py310.py
app = FastAPI() items = {"foo": {"name": "Fighters", "size": 6}, "bar": {"name": "Tenders", "size": 3}} @app.put("/items/{item_id}") async def upsert_item( item_id: str, name: str | None = Body(default=None), size: int | None = Body(default=None), ): if item_id in items: item = items[item_id] item["name"] = name item["size"] = size return item
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 646 bytes - Viewed (0) -
docs_src/body_fields/tutorial001_an_py39.py
from typing import Annotated, Union from fastapi import Body, FastAPI from pydantic import BaseModel, Field app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = Field( default=None, title="The description of the item", max_length=300 ) price: float = Field(gt=0, description="The price must be greater than zero") tax: Union[float, None] = None @app.put("/items/{item_id}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 582 bytes - Viewed (0) -
docs_src/handling_errors/tutorial004.py
@app.exception_handler(StarletteHTTPException) async def http_exception_handler(request, exc): return PlainTextResponse(str(exc.detail), status_code=exc.status_code) @app.exception_handler(RequestValidationError) async def validation_exception_handler(request, exc): return PlainTextResponse(str(exc), status_code=400) @app.get("/items/{item_id}") async def read_item(item_id: int): if item_id == 3:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 762 bytes - Viewed (0)