- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 180 for Bool (0.18 sec)
-
tests/test_additional_properties_bool.py
Sebastián Ramírez <******@****.***> 1688749933 +0200
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 4.2K bytes - Viewed (0) -
docs_src/openapi_callbacks/tutorial001.py
class Invoice(BaseModel): id: str title: Union[str, None] = None customer: str total: float class InvoiceEvent(BaseModel): description: str paid: bool class InvoiceEventReceived(BaseModel): ok: bool invoices_callback_router = APIRouter() @invoices_callback_router.post( "{$callback_url}/invoices/{$request.body.id}", response_model=InvoiceEventReceived )
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 1.3K bytes - Viewed (0) -
docs_src/query_params/tutorial003_py310.py
from fastapi import FastAPI app = FastAPI() @app.get("/items/{item_id}") async def read_item(item_id: str, q: str | None = None, short: bool = False): item = {"item_id": item_id} if q: item.update({"q": q}) if not short: item.update( {"description": "This is an amazing item that has a long description"} )
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 374 bytes - Viewed (0) -
docs_src/dependencies/tutorial011_an_py39.py
return self.fixed_content in q return False checker = FixedContentQueryChecker("bar") @app.get("/query-checker/") async def read_query_check(fixed_content_included: Annotated[bool, Depends(checker)]):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 544 bytes - Viewed (0) -
docs_src/query_params/tutorial004.py
from typing import Union from fastapi import FastAPI app = FastAPI() @app.get("/users/{user_id}/items/{item_id}") async def read_user_item( user_id: int, item_id: str, q: Union[str, None] = None, short: bool = False ): item = {"item_id": item_id, "owner_id": user_id} if q: item.update({"q": q}) if not short: item.update(
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 468 bytes - Viewed (0) -
fastapi/dependencies/models.py
background_tasks_param_name: Optional[str] = None, security_scopes_param_name: Optional[str] = None, security_scopes: Optional[List[str]] = None, use_cache: bool = True, path: Optional[str] = None, ) -> None: self.path_params = path_params or [] self.query_params = query_params or [] self.header_params = header_params or []
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 2.4K bytes - Viewed (0) -
docs/ja/docs/tutorial/query-params.md
``` この場合、関数パラメータ `q` はオプショナルとなり、デフォルトでは `None` になります。 !!! check "確認" パスパラメータ `item_id` はパスパラメータであり、`q` はそれとは違ってクエリパラメータであると判別できるほど**FastAPI** が賢いということにも注意してください。 ## クエリパラメータの型変換 `bool` 型も宣言できます。これは以下の様に変換されます: ```Python hl_lines="9" {!../../../docs_src/query_params/tutorial003.py!} ``` この場合、以下にアクセスすると: ``` http://127.0.0.1:8000/items/foo?short=1 ``` もしくは、 ```
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 5.6K bytes - Viewed (0) -
fastapi/params.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 27.5K bytes - Viewed (1) -
docs_src/security/tutorial004_an_py310.py
token_type: str class TokenData(BaseModel): username: str | None = None class User(BaseModel): username: str email: str | None = None full_name: str | None = None disabled: bool | None = None class UserInDB(User): hashed_password: str pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto") oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 4.1K bytes - Viewed (0) -
fastapi/dependencies/utils.py
field_info=field_info, ) return type_annotation, depends, field def is_body_param(*, param_field: ModelField, is_path_param: bool) -> bool: if is_path_param: assert is_scalar_field( field=param_field ), "Path params must be of one of the supported types" return False
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Apr 02 02:52:56 GMT 2024 - 29.5K bytes - Viewed (0)