- Sort Score
- Result 10 results
- Languages All
Results 761 - 770 of 974 for strl (0.02 sec)
-
docs/zh/docs/tutorial/path-operation-configuration.md
/// note | "技术细节" 也可以使用 `from starlette import status` 导入状态码。 **FastAPI** 的`fastapi.status` 和 `starlette.status` 一样,只是快捷方式。实际上,`fastapi.status` 直接继承自 Starlette。 /// ## `tags` 参数 `tags` 参数的值是由 `str` 组成的 `list` (一般只有一个 `str` ),`tags` 用于为*路径操作*添加标签: ```Python hl_lines="17 22 27" {!../../docs_src/path_operation_configuration/tutorial002.py!} ``` OpenAPI 概图会自动添加标签,供 API 文档接口使用:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.3K bytes - Viewed (0) -
docs/pt/docs/tutorial/index.md
<div class="termy"> ```console $ uvicorn main:app --reload <span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) <span style="color: green;">INFO</span>: Started reloader process [28720] <span style="color: green;">INFO</span>: Started server process [28722]
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 2.7K bytes - Viewed (0) -
tests/test_validate_response.py
from fastapi import FastAPI from fastapi.exceptions import ResponseValidationError from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: Optional[float] = None owner_ids: Optional[List[int]] = None @app.get("/items/invalid", response_model=Item) def get_invalid(): return {"name": "invalid", "price": "foo"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 2K bytes - Viewed (0) -
docs/es/docs/features.md
```Python from datetime import date from pydantic import BaseModel # Declaras la variable como un str # y obtienes soporte del editor dentro de la función def main(user_id: str): return user_id # Un modelo de Pydantic class User(BaseModel): id: int name: str joined: date ``` Este puede ser usado como: ```Python
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Aug 19 18:15:21 UTC 2024 - 10.9K bytes - Viewed (0) -
docs/pt/docs/features.md
```Python from datetime import date from pydantic import BaseModel # Declare uma variável como str # e obtenha suporte do editor dentro da função def main(user_id: str): return user_id # Um modelo do Pydantic class User(BaseModel): id: int name: str joined: date ``` Que então pode ser usado como: ```Python
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 10.3K bytes - Viewed (0) -
src/main/java/jcifs/smb1/smb1/NtlmPasswordAuthentication.java
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Fri Mar 22 21:10:40 UTC 2019 - 22.5K bytes - Viewed (0) -
docs/en/docs/tutorial/response-model.md
```Python hl_lines="11 13-14" {!> ../../docs_src/response_model/tutorial004.py!} ``` //// * `description: Union[str, None] = None` (or `str | None = None` in Python 3.10) has a default of `None`. * `tax: float = 10.5` has a default of `10.5`. * `tags: List[str] = []` has a default of an empty list: `[]`. but you might want to omit them from the result if they were not actually stored.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 18.1K bytes - Viewed (0) -
tests/test_generate_unique_id_function.py
return f"bar_{route.name}" def custom_generate_unique_id3(route: APIRoute): return f"baz_{route.name}" class Item(BaseModel): name: str price: float class Message(BaseModel): title: str description: str def test_top_level_generate_unique_id(): app = FastAPI(generate_unique_id_function=custom_generate_unique_id) router = APIRouter()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jan 13 15:10:26 UTC 2024 - 66.7K bytes - Viewed (0) -
docs/pt/docs/tutorial/path-params-numeric-validations.md
/// ## Ordene os parâmetros de acordo com sua necessidade Suponha que você queira declarar o parâmetro de consulta `q` como uma `str` obrigatória. E você não precisa declarar mais nada em relação a este parâmetro, então você não precisa necessariamente usar `Query`. Mas você ainda precisa usar `Path` para o parâmetro de rota `item_id`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.6K bytes - Viewed (0) -
tests/test_computed_fields.py
return Rectangle(width=3, length=4) client = TestClient(app) return client @pytest.mark.parametrize("path", ["/", "/responses"]) @needs_pydanticv2 def test_get(client: TestClient, path: str): response = client.get(path) assert response.status_code == 200, response.text assert response.json() == {"width": 3, "length": 4, "area": 12} @needs_pydanticv2
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 12 09:44:57 UTC 2024 - 3K bytes - Viewed (0)