- Sort Score
- Result 10 results
- Languages All
Results 941 - 950 of 1,087 for tstr (0.02 sec)
-
docs/fr/docs/tutorial/body.md
* Si le paramètre est déclaré comme ayant pour type un **modèle Pydantic**, il sera interprété comme faisant partie du **corps** de la requête. /// note **FastAPI** saura que la valeur de `q` n'est pas requise grâce à la valeur par défaut `=None`.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Nov 09 16:39:20 UTC 2024 - 7.6K bytes - Viewed (0) -
tests/test_dependency_paramless.py
SecurityScopes, ) from fastapi.testclient import TestClient app = FastAPI() oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token") def process_auth( credentials: Annotated[Union[str, None], Security(oauth2_scheme)], security_scopes: SecurityScopes, ): # This is an incorrect way of using it, this is not checking if the scopes are
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 2.3K bytes - Viewed (0) -
docs/pt/docs/advanced/custom-response.md
Você pode retorná-la diretamente. Ela aceita os seguintes parâmetros: * `content` - Uma sequência de caracteres (`str`) ou `bytes`. * `status_code` - Um código de status HTTP do tipo `int`. * `headers` - Um dicionário `dict` de strings. * `media_type` - Uma `str` informando o media type. E.g. `"text/html"`.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 13.8K bytes - Viewed (0) -
docs/pt/docs/advanced/settings.md
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 13K bytes - Viewed (0) -
tests/test_regex_deprecated_body.py
from .utils import needs_py310 def get_client(): app = FastAPI() with pytest.warns(FastAPIDeprecationWarning): @app.post("/items/") async def read_items( q: Annotated[str | None, Form(regex="^fixedquery$")] = None, ): if q: return f"Hello {q}" else: return "Hello World" client = TestClient(app) return client
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 5.2K bytes - Viewed (0) -
tests/test_response_model_sub_types.py
from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel class Model(BaseModel): name: str app = FastAPI() @app.get("/valid1", responses={"500": {"model": int}}) def valid1(): pass @app.get("/valid2", responses={"500": {"model": list[int]}}) def valid2(): pass @app.get("/valid3", responses={"500": {"model": Model}}) def valid3(): pass
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 5.2K bytes - Viewed (0) -
docs/zh/docs/tutorial/dependencies/classes-as-dependencies.md
```Python something(some_argument, some_keyword_argument="foo") ``` 这就是 "可调用对象"。 ## 类作为依赖项 您可能会注意到,要创建一个 Python 类的实例,您可以使用相同的语法。 举个例子: ```Python class Cat: def __init__(self, name: str): self.name = name fluffy = Cat(name="Mr Fluffy") ``` 在这个例子中, `fluffy` 是一个 `Cat` 类的实例。 为了创建 `fluffy`,你调用了 `Cat` 。 所以,Python 类也是 **可调用对象**。
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 5.3K bytes - Viewed (0) -
docs/ja/docs/tutorial/query-params.md
特定の値を与えずにただオプショナルにしたい場合はデフォルト値を `None` にして下さい。 しかしクエリパラメータを必須にしたい場合は、ただデフォルト値を宣言しなければよいです: {* ../../docs_src/query_params/tutorial005.py hl[6:7] *} ここで、クエリパラメータ `needy` は `str` 型の必須のクエリパラメータです 以下のURLをブラウザで開くと: ``` http://127.0.0.1:8000/items/foo-item ``` ...必須のパラメータ `needy` を加えなかったので、以下の様なエラーが表示されます: ```JSON { "detail": [ {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/es/docs/advanced/settings.md
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 13.2K bytes - Viewed (0) -
docs/ja/docs/tutorial/body-updates.md
項目を更新するには<a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT" class="external-link" target="_blank">HTTPの`PUT`</a>操作を使用することができます。 `jsonable_encoder`を用いて、入力データをJSON形式で保存できるデータに変換することができます(例:NoSQLデータベース)。例えば、`datetime`を`str`に変換します。 {* ../../docs_src/body_updates/tutorial001.py hl[30,31,32,33,34,35] *} 既存のデータを置き換えるべきデータを受け取るために`PUT`は使用されます。 ### 置換についての注意 つまり、`PUT`を使用して以下のボディで項目`bar`を更新したい場合は: ```Python {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 5K bytes - Viewed (0)