- Sort Score
- Result 10 results
- Languages All
Results 711 - 720 of 1,178 for strs (0.01 sec)
-
docs_src/response_change_status_code/tutorial001_py39.py
from fastapi import FastAPI, Response, status app = FastAPI() tasks = {"foo": "Listen to the Bar Fighters"} @app.put("/get-or-create-task/{task_id}", status_code=200) def get_or_create_task(task_id: str, response: Response): if task_id not in tasks: tasks[task_id] = "This didn't exist before" response.status_code = status.HTTP_201_CREATED
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 391 bytes - Viewed (0) -
docs/ja/docs/tutorial/body-nested-models.md
* データ変換 * データの検証 * 自動文書化 ## 特殊な型とバリデーション `str`や`int`、`float`のような通常の単数型の他にも、`str`を継承したより複雑な単数型を使うこともできます。 すべてのオプションをみるには、<a href="https://docs.pydantic.dev/latest/concepts/types/" class="external-link" target="_blank">Pydanticのエキゾチック な型</a>のドキュメントを確認してください。次の章でいくつかの例をみることができます。 例えば、`Image`モデルのように`url`フィールドがある場合、`str`の代わりにPydanticの`HttpUrl`を指定することができます:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 8.5K bytes - Viewed (0) -
docs/ja/docs/tutorial/security/get-current-user.md
依存関係はサブ依存関係を持つことができるのを覚えていますか? `get_current_user` は前に作成した `oauth2_scheme` と同じ依存関係を持ちます。 以前直接 *path operation* の中でしていたのと同じように、新しい依存関係である `get_current_user` は `str` として `token` を受け取るようになります: {* ../../docs_src/security/tutorial002.py hl[25] *} ## ユーザーの取得 `get_current_user` は作成した(偽物の)ユーティリティ関数を使って、 `str` としてトークンを受け取り、先ほどのPydanticの `User` モデルを返却します: {* ../../docs_src/security/tutorial002.py hl[19:22,26:27] *} ## 現在のユーザーの注入Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 5.4K bytes - Viewed (0) -
docs/en/docs/tutorial/path-params.md
### Create an `Enum` class { #create-an-enum-class } Import `Enum` and create a sub-class that inherits from `str` and from `Enum`. By inheriting from `str` the API docs will be able to know that the values must be of type `string` and will be able to render correctly. Then create class attributes with fixed values, which will be the available valid values:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 9.2K bytes - Viewed (0) -
docs/es/docs/tutorial/path-params.md
### Crear una clase `Enum` { #create-an-enum-class } Importa `Enum` y crea una subclase que herede de `str` y de `Enum`. Al heredar de `str`, la documentación de la API podrá saber que los valores deben ser de tipo `string` y podrá representarlos correctamente. Luego crea atributos de clase con valores fijos, que serán los valores válidos disponibles:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 9.8K bytes - Viewed (0) -
docs/ru/docs/features.md
```Python from datetime import date from pydantic import BaseModel # Объявляем параметр как `str` # и получаем поддержку редактора кода внутри функции def main(user_id: str): return user_id # Модель Pydantic class User(BaseModel): id: int name: str joined: date ``` Это можно использовать так: ```Python
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 16K bytes - Viewed (0) -
docs_src/request_forms_and_files/tutorial001_py39.py
from fastapi import FastAPI, File, Form, UploadFile app = FastAPI() @app.post("/files/") async def create_file( file: bytes = File(), fileb: UploadFile = File(), token: str = Form() ): return { "file_size": len(file), "token": token, "fileb_content_type": fileb.content_type,
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 317 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial006c_py310.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Feb 15 16:23:59 UTC 2025 - 261 bytes - Viewed (0) -
docs_src/graphql_/tutorial001_py39.py
import strawberry from fastapi import FastAPI from strawberry.fastapi import GraphQLRouter @strawberry.type class User: name: str age: int @strawberry.type class Query: @strawberry.field def user(self) -> User: return User(name="Patrick", age=100) schema = strawberry.Schema(query=Query) graphql_app = GraphQLRouter(schema) app = FastAPI()Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 424 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial001_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 271 bytes - Viewed (0)