- Sort Score
- Result 10 results
- Languages All
Results 431 - 440 of 1,074 for Str (0.02 sec)
-
docs_src/websockets/tutorial003.py
def disconnect(self, websocket: WebSocket): self.active_connections.remove(websocket) async def send_personal_message(self, message: str, websocket: WebSocket): await websocket.send_text(message) async def broadcast(self, message: str): for connection in self.active_connections: await connection.send_text(message) manager = ConnectionManager() @app.get("/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Aug 09 13:52:19 UTC 2020 - 2.5K bytes - Viewed (0) -
docs_src/cookie_param_models/tutorial002_pv1_an_py310.py
from fastapi import Cookie, FastAPI from pydantic import BaseModel app = FastAPI() class Cookies(BaseModel): class Config: extra = "forbid" session_id: str fatebook_tracker: str | None = None googall_tracker: str | None = None @app.get("/items/") async def read_items(cookies: Annotated[Cookies, Cookie()]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 387 bytes - Viewed (0) -
docs_src/body_nested_models/tutorial002_py310.py
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: list[str] = [] @app.put("/items/{item_id}") async def update_item(item_id: int, item: Item): results = {"item_id": item_id, "item": item}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 369 bytes - Viewed (0) -
docs_src/body_nested_models/tutorial003_py310.py
from fastapi import FastAPI 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.put("/items/{item_id}") async def update_item(item_id: int, item: Item): results = {"item_id": item_id, "item": item}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 371 bytes - Viewed (0) -
guava-tests/test/com/google/common/io/TestCharSink.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 2K bytes - Viewed (0) -
docs_src/body_nested_models/tutorial002_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: list[str] = [] @app.put("/items/{item_id}") async def update_item(item_id: int, item: Item): results = {"item_id": item_id, "item": item}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 407 bytes - Viewed (0) -
internal/config/bool-flag.go
// Any other value returns an error. func ParseBool(str string) (bool, error) { switch str { case "1", "t", "T", "true", "TRUE", "True", "on", "ON", "On": return true, nil case "0", "f", "F", "false", "FALSE", "False", "off", "OFF", "Off": return false, nil } if strings.EqualFold(str, "enabled") { return true, nil } if strings.EqualFold(str, "disabled") { return false, nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Apr 07 15:10:40 UTC 2022 - 2.3K bytes - Viewed (0) -
docs/ko/docs/python-types.md
* 변수 `prices`는 `dict`이다: * `dict`의 키(key)는 `str`타입이다. (각 아이템의 이름(name)) * `dict`의 값(value)는 `float`타입이다. (각 아이템의 가격(price)) #### `Optional` `str`과 같이 타입을 선언할 때 `Optional`을 쓸 수도 있는데, "선택적(Optional)"이기때문에 `None`도 될 수 있습니다: ```Python hl_lines="1 4" {!../../docs_src/python_types/tutorial009.py!} ``` `Optional[str]`을 `str` 대신 쓰게 되면, 특정 값이 실제로는 `None`이 될 수도 있는데 항상 `str`이라고 가정하는 상황에서 에디터가 에러를 찾게 도와줄 수 있습니다.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.5K bytes - Viewed (0) -
tests/test_dependency_security_overrides.py
return "alice", required_scopes.scopes def get_data(): return [1, 2, 3] def get_data_override(): return [3, 4, 5] @app.get("/user") def read_user( user_data: Tuple[str, List[str]] = Security(get_user, scopes=["foo", "bar"]), data: List[int] = Depends(get_data), ): return {"user": user_data[0], "scopes": user_data[1], "data": data} client = TestClient(app)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Jun 14 15:54:46 UTC 2020 - 1.4K bytes - Viewed (0) -
docs/de/docs/tutorial/dependencies/sub-dependencies.md
```Python hl_lines="1" async def needy_dependency(fresh_value: Annotated[str, Depends(get_value, use_cache=False)]): return {"fresh_value": fresh_value} ``` //// //// tab | Python 3.8+ nicht annotiert /// tip | "Tipp" Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="1" async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.2K bytes - Viewed (0)