- Sort Score
- Num 10 results
- Language All
Results 231 - 240 of 1,087 for tstr (0.02 seconds)
-
src/main/java/org/codelibs/core/lang/StringUtil.java
Created: Sat Dec 20 08:55:33 GMT 2025 - Last Modified: Sat Nov 22 11:21:59 GMT 2025 - 21.5K bytes - Click Count (0) -
docs/ko/docs/tutorial/query-params.md
/// check | 확인 **FastAPI**는 `item_id`가 경로 매개변수이고 `q`는 경로 매개변수가 아닌 쿼리 매개변수라는 것을 알 정도로 충분히 똑똑합니다. /// /// note | 참고 FastAPI는 `q`가 `= None`이므로 선택적이라는 것을 인지합니다. `Union[str, None]`에 있는 `Union`은 FastAPI(FastAPI는 `str` 부분만 사용합니다)가 사용하는게 아니지만, `Union[str, None]`은 편집기에게 코드에서 오류를 찾아낼 수 있게 도와줍니다. /// ## 쿼리 매개변수 형변환 `bool` 형으로 선언할 수도 있고, 아래처럼 변환됩니다: {* ../../docs_src/query_params/tutorial003.py hl[9] *}
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 18 02:25:44 GMT 2024 - 5.2K bytes - Click Count (0) -
docs/pt/docs/python-types.md
```Python hl_lines="1 4" {!../../docs_src/python_types/tutorial009_py39.py!} ``` O uso de `Optional[str]` em vez de apenas `str` permitirá que o editor o ajude a detectar erros, onde você pode estar assumindo que um valor é sempre um `str`, quando na verdade também pode ser `None`. `Optional[Something]` é na verdade um atalho para `Union[Something, None]`, eles são equivalentes.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 16.7K bytes - Click Count (0) -
docs/es/docs/python-types.md
```Python hl_lines="1 4" {!../../docs_src/python_types/tutorial009_py39.py!} ``` Usar `Optional[str]` en lugar de solo `str` te permitirá al editor ayudarte a detectar errores donde podrías estar asumiendo que un valor siempre es un `str`, cuando en realidad también podría ser `None`. `Optional[Something]` es realmente un atajo para `Union[Something, None]`, son equivalentes. Esto también significa que en Python 3.10, puedes usar `Something | None`:Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 16.4K bytes - Click Count (1) -
docs_src/path_operation_configuration/tutorial001_py310.py
from fastapi import FastAPI, status from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: set[str] = set() @app.post("/items/", response_model=Item, status_code=status.HTTP_201_CREATED) async def create_item(item: Item):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 363 bytes - Click Count (0) -
docs_src/bigger_applications/app_py39/routers/items.py
@router.get("/{item_id}") async def read_item(item_id: str): if item_id not in fake_items_db: raise HTTPException(status_code=404, detail="Item not found") return {"name": fake_items_db[item_id]["name"], "item_id": item_id} @router.put( "/{item_id}", tags=["custom"], responses={403: {"description": "Operation forbidden"}}, ) async def update_item(item_id: str): if item_id != "plumbus":
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1011 bytes - Click Count (0) -
docs_src/path_operation_configuration/tutorial001_py39.py
from typing import Union from fastapi import FastAPI, status 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, status_code=status.HTTP_201_CREATED) async def create_item(item: Item):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 401 bytes - Click Count (0) -
docs_src/encoder/tutorial001_py39.py
from fastapi.encoders import jsonable_encoder from pydantic import BaseModel fake_db = {} class Item(BaseModel): title: str timestamp: datetime description: Union[str, None] = None app = FastAPI() @app.put("/items/{id}") def update_item(id: str, item: Item): json_compatible_item_data = jsonable_encoder(item)Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 461 bytes - Click Count (0) -
tests/test_dependency_yield_except_httpexception.py
state["finally"] = True @app.put("/invalid-user/{user_id}") def put_invalid_user( user_id: str, name: str = Body(), db: dict = Depends(get_database) ): db[user_id] = name raise HTTPException(status_code=400, detail="Invalid user") @app.put("/user/{user_id}") def put_user(user_id: str, name: str = Body(), db: dict = Depends(get_database)): db[user_id] = name return {"message": "OK"}
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Sep 29 03:29:38 GMT 2025 - 1.9K bytes - Click Count (0) -
docs_src/dependencies/tutorial013_an_py310.py
if not user: raise HTTPException(status_code=403, detail="Not authorized") def generate_stream(query: str): for ch in query: yield ch time.sleep(0.1) @app.get("/generate", dependencies=[Depends(get_user)]) def generate(query: str):Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Sep 29 03:29:38 GMT 2025 - 937 bytes - Click Count (0)