- Sort Score
- Result 10 results
- Languages All
Results 121 - 130 of 529 for unionOf (0.04 sec)
-
docs_src/path_operation_configuration/tutorial002.py
from typing import Set, Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: Set[str] = set() @app.post("/items/", response_model=Item, tags=["items"]) async def create_item(item: Item): return item @app.get("/items/", tags=["items"])
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 580 bytes - Viewed (0) -
docs_src/security/tutorial005_an_py39.py
class Token(BaseModel): access_token: str token_type: str class TokenData(BaseModel): username: Union[str, None] = None scopes: List[str] = [] class User(BaseModel): username: str email: Union[str, None] = None full_name: Union[str, None] = None disabled: Union[bool, None] = None class UserInDB(User): hashed_password: str
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 5.3K bytes - Viewed (0) -
docs_src/sql_databases/tutorial001.py
from typing import List, Union from fastapi import Depends, FastAPI, HTTPException, Query from sqlmodel import Field, Session, SQLModel, create_engine, select class Hero(SQLModel, table=True): id: Union[int, None] = Field(default=None, primary_key=True) name: str = Field(index=True) age: Union[int, None] = Field(default=None, index=True) secret_name: str sqlite_file_name = "database.db"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 1.8K bytes - Viewed (0) -
docs_src/path_operation_configuration/tutorial004_py39.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: set[str] = set() @app.post("/items/", response_model=Item, summary="Create an item") async def create_item(item: Item): """ Create an item with all the information:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 676 bytes - Viewed (0) -
docs/fr/docs/tutorial/query-params-str-validations.md
Le paramètre de requête `q` a pour type `Union[str, None]` (ou `str | None` en Python 3.10), signifiant qu'il est de type `str` mais pourrait aussi être égal à `None`, et bien sûr, la valeur par défaut est `None`, donc **FastAPI** saura qu'il n'est pas requis. /// note **FastAPI** saura que la valeur de `q` n'est pas requise grâce à la valeur par défaut `= None`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 17:14:38 UTC 2024 - 9.5K bytes - Viewed (0) -
tests/test_schema_extra_examples.py
@app.get("/query_example/") def query_example( data: Union[str, None] = Query( default=None, example="query1", ), ): return data @app.get("/query_examples/") def query_examples( data: Union[str, None] = Query( default=None, examples=["query1", "query2"], ),
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 37.7K bytes - Viewed (0) -
docs_src/sql_databases/tutorial001_an.py
from typing import List, Union from fastapi import Depends, FastAPI, HTTPException, Query from sqlmodel import Field, Session, SQLModel, create_engine, select from typing_extensions import Annotated class Hero(SQLModel, table=True): id: Union[int, None] = Field(default=None, primary_key=True) name: str = Field(index=True) age: Union[int, None] = Field(default=None, index=True) secret_name: str
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 1.8K bytes - Viewed (0) -
docs_src/header_params/tutorial001_an.py
from typing import Union from fastapi import FastAPI, Header from typing_extensions import Annotated app = FastAPI() @app.get("/items/") async def read_items(user_agent: Annotated[Union[str, None], Header()] = None):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 259 bytes - Viewed (0) -
src/main/java/jcifs/dcerpc/msrpc/srvsvc.idl
typedef struct { int count; [size_is(count)] ShareInfo502 *array; } ShareInfoCtr502; typedef [switch_type(int)] union { [case(0)] ShareInfo0 *info0; [case(1)] ShareInfo1 *info1; [case(502)] ShareInfo502 *info1; } ShareInfo; typedef [switch_type(int)] union { [case(0)] ShareInfoCtr0 *info0; [case(1)] ShareInfoCtr1 *info1; [case(502)] ShareInfoCtr502 *info1; } ShareCtr; [op(0x0f)]
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Jul 01 13:12:10 UTC 2018 - 2.2K bytes - Viewed (0) -
docs_src/header_params/tutorial003_an.py
from typing import List, Union from fastapi import FastAPI, Header from typing_extensions import Annotated app = FastAPI() @app.get("/items/") async def read_items(x_token: Annotated[Union[List[str], None], Header()] = None):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 269 bytes - Viewed (0)