- Sort Score
- Result 10 results
- Languages All
Results 321 - 330 of 880 for unkown (0.07 sec)
-
tests/test_openapi_examples.py
from typing import Union 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"}, ],
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Fri Sep 06 15:57:43 UTC 2024 - 17.7K bytes - Viewed (0) -
istioctl/pkg/xds/client.go
// TODO: https://github.com/istio/istio/issues/41937 grpc.WithTransportCredentials(credentials.NewTLS( &tls.Config{ // Always skip verifying, because without it we always get "certificate signed by unknown authority". // We don't set the XDSSAN for the same reason. InsecureSkipVerify: true, })), grpc.WithPerRPCCredentials(k8sCreds), }, nil
Registered: Wed Oct 30 22:53:10 UTC 2024 - Last Modified: Tue Dec 19 22:42:42 UTC 2023 - 3.7K bytes - Viewed (0) -
docs_src/schema_extra_example/tutorial005_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 Oct 27 07:19:11 UTC 2024 - Last Modified: Sat Aug 26 18:03:13 UTC 2023 - 1.5K bytes - Viewed (0) -
docs_src/python_types/tutorial011.py
from datetime import datetime from typing import List, Union from pydantic import BaseModel class User(BaseModel): id: int name: str = "John Doe" signup_ts: Union[datetime, None] = None friends: List[int] = [] external_data = { "id": "123", "signup_ts": "2017-06-01 12:22", "friends": [1, "2", b"3"], } user = User(**external_data) print(user)
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sat Sep 02 15:56:35 UTC 2023 - 498 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial014_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( hidden_query: Annotated[Union[str, None], Query(include_in_schema=False)] = None, ): if hidden_query: return {"hidden_query": hidden_query} else:
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 344 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial002.py
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 308 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial007.py
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 336 bytes - Viewed (0) -
docs/de/docs/tutorial/query-params-str-validations.md
```Python q: str ``` statt: ```Python q: Union[str, None] = None ``` Aber jetzt deklarieren wir den Parameter mit `Query`, wie in: //// tab | Annotiert ```Python q: Annotated[Union[str, None], Query(min_length=3)] = None ``` //// //// tab | Nicht annotiert ```Python q: Union[str, None] = Query(default=None, min_length=3) ``` ////
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 27.2K bytes - Viewed (0) -
docs/zh/docs/tutorial/extra-models.md
{!> ../../docs_src/extra_models/tutorial002.py!} ``` //// ## `Union` 或者 `anyOf` 响应可以声明为两种类型的 `Union` 类型,即该响应可以是两种类型中的任意类型。 在 OpenAPI 中可以使用 `anyOf` 定义。 为此,请使用 Python 标准类型提示 <a href="https://docs.python.org/3/library/typing.html#typing.Union" class="external-link" target="_blank">`typing.Union`</a>: /// note | "笔记"
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.6K bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial002_an.py
from typing import Union from fastapi import FastAPI, Query from typing_extensions import Annotated app = FastAPI() @app.get("/items/") async def read_items(q: Annotated[Union[str, None], Query(max_length=50)] = None): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 351 bytes - Viewed (0)