- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 974 for strl (0.04 sec)
-
docs/ko/docs/index.md
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: float is_offer: Union[bool, None] = None @app.get("/") def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}") def read_item(item_id: int, q: Union[str, None] = None): return {"item_id": item_id, "q": q} @app.put("/items/{item_id}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 16 16:50:01 UTC 2024 - 19.4K bytes - Viewed (0) -
tensorflow/c/c_api_function_test.cc
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Jul 20 22:08:54 UTC 2023 - 63.6K bytes - Viewed (0) -
docs/uk/docs/python-types.md
```Python hl_lines="1 4" {!../../docs_src/python_types/tutorial009.py!} ``` Використання `Optional[str]` замість просто `str` дозволить редактору допомогти вам виявити помилки, коли ви могли б вважати, що значенням завжди є `str`, хоча насправді воно також може бути `None`. `Optional[Something]` насправді є скороченням для `Union[Something, None]`, вони еквівалентні. Це також означає, що в Python 3.10 ви можете використовувати `Something | None`:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 19.5K bytes - Viewed (0) -
docs/zh/docs/python-types.md
然后你尝试向程序员老手的朋友——编辑器自动补全寻求帮助。 输入函数的第一个参数 `first_name`,输入点号(`.`)然后敲下 `Ctrl+Space` 来触发代码补全。 但遗憾的是并没有起什么作用: <img src="https://fastapi.tiangolo.com/img/python-types/image01.png"> ### 添加类型 让我们来修改上面例子的一行代码。 我们将把下面这段代码中的函数参数从: ```Python first_name, last_name ``` 改成: ```Python first_name: str, last_name: str ``` 就是这样。 这些就是"类型提示": ```Python hl_lines="1"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.6K bytes - Viewed (0) -
tests/test_dependency_class.py
class MethodsDependency: def synchronous(self, value: str) -> str: return value async def asynchronous(self, value: str) -> str: return value def synchronous_gen(self, value: str) -> Generator[str, None, None]: yield value async def asynchronous_gen(self, value: str) -> AsyncGenerator[str, None]: yield value callable_dependency = CallableDependency()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Aug 09 10:54:05 UTC 2020 - 3.3K bytes - Viewed (0) -
docs/en/docs/index.md
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: float is_offer: Union[bool, None] = None @app.get("/") def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}") def read_item(item_id: int, q: Union[str, None] = None): return {"item_id": item_id, "q": q} @app.put("/items/{item_id}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 20 19:20:23 UTC 2024 - 20.4K bytes - Viewed (0) -
fastapi/params.py
annotation: Optional[Any] = None, alias: Optional[str] = None, alias_priority: Union[int, None] = _Unset, # TODO: update when deprecating Pydantic v1, import these types # validation_alias: str | AliasPath | AliasChoices | None validation_alias: Union[str, None] = None, serialization_alias: Union[str, None] = None, title: Optional[str] = None, description: Optional[str] = None,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Sep 06 18:06:20 UTC 2024 - 27.5K bytes - Viewed (0) -
fastapi/dependencies/models.py
name: Optional[str] = None call: Optional[Callable[..., Any]] = None request_param_name: Optional[str] = None websocket_param_name: Optional[str] = None http_connection_param_name: Optional[str] = None response_param_name: Optional[str] = None background_tasks_param_name: Optional[str] = None security_scopes_param_name: Optional[str] = None security_scopes: Optional[List[str]] = None
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 31 20:19:30 UTC 2024 - 1.5K bytes - Viewed (0) -
fastapi/openapi/models.py
description: Optional[str] = None content: Dict[str, MediaType] required: Optional[bool] = None class Link(BaseModelWithConfig): operationRef: Optional[str] = None operationId: Optional[str] = None parameters: Optional[Dict[str, Union[Any, str]]] = None requestBody: Optional[Union[Any, str]] = None description: Optional[str] = None server: Optional[Server] = None
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 22:49:33 UTC 2024 - 15K bytes - Viewed (0) -
.github/actions/notify-translations/app/main.py
def get_graphql_response( *, settings: Settings, query: str, after: Union[str, None] = None, category_id: Union[str, None] = None, discussion_number: Union[int, None] = None, discussion_id: Union[str, None] = None, comment_id: Union[str, None] = None, body: Union[str, None] = None, ) -> Dict[str, Any]: headers = {"Authorization": f"token {settings.input_token.get_secret_value()}"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Jul 29 23:35:07 UTC 2024 - 12.4K bytes - Viewed (0)