- Sort Score
- Num 10 results
- Language All
Results 111 - 120 of 1,089 for itens (0.25 seconds)
-
docs/fr/docs/tutorial/query-params.md
Dans ce cas, si vous allez sur : ``` http://127.0.0.1:8000/items/foo?short=1 ``` ou ``` http://127.0.0.1:8000/items/foo?short=True ``` ou ``` http://127.0.0.1:8000/items/foo?short=true ``` ou ``` http://127.0.0.1:8000/items/foo?short=on ``` ou ``` http://127.0.0.1:8000/items/foo?short=yes ```
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:37:13 GMT 2026 - 5.3K bytes - Click Count (0) -
tests/test_tutorial/test_additional_responses/test_tutorial004.py
def test_path_operation(client: TestClient): response = client.get("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"id": "foo", "value": "there goes my hero"} @workdir_lock def test_path_operation_img(client: TestClient): shutil.copy("./docs/en/docs/img/favicon.png", "./image.png") response = client.get("/items/foo?img=1") assert response.status_code == 200, response.text
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 27 10:53:47 GMT 2026 - 5.5K bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial008_py310.py
from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: str | None = Query( default=None, title="Query string", description="Query string for the items to search in the database that have a good match", min_length=3, ), ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 434 bytes - Click Count (0) -
docs/ja/docs/tutorial/bigger-applications.md
アプリケーションの「items」を扱うエンドポイントが `app/routers/items.py` のモジュールにあるとします。 次の *path operations* があります: * `/items/` * `/items/{item_id}` 構造は `app/routers/users.py` と同じです。 しかし、もう少し賢くしてコードを少し簡潔にしたいところです。 このモジュールのすべての *path operations* には同じものがあると分かっています: * パスの `prefix`: `/items` * `tags`(1つのタグ: `items`) * 追加の `responses`Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 22.8K bytes - Click Count (0) -
docs/de/docs/tutorial/path-params.md
Der Wert des Pfad-Parameters `item_id` wird Ihrer Funktion als das Argument `item_id` übergeben. Wenn Sie dieses Beispiel ausführen und auf [http://127.0.0.1:8000/items/foo](http://127.0.0.1:8000/items/foo) gehen, sehen Sie als <abbr title="Response – Antwort: Daten, die der Server zum anfragenden Client zurücksendet">Response</abbr>: ```JSON {"item_id":"foo"} ```
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:58:09 GMT 2026 - 10K bytes - Click Count (0) -
tests/test_multi_body_errors.py
class Item(BaseModel): name: str age: condecimal(gt=Decimal(0.0)) # type: ignore @app.post("/items/") def save_item_no_body(item: list[Item]): return {"item": item} client = TestClient(app) def test_put_correct_body(): response = client.post("/items/", json=[{"name": "Foo", "age": 5}]) assert response.status_code == 200, response.text assert response.json() == snapshot(
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 6.7K bytes - Click Count (0) -
tests/test_param_class.py
from fastapi.params import Param from fastapi.testclient import TestClient app = FastAPI() @app.get("/items/") def read_items(q: str | None = Param(default=None)): # type: ignore return {"q": q} client = TestClient(app) def test_default_param_query_none(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == {"q": None}
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 604 bytes - Click Count (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial005.py
mod = importlib.import_module(f"docs_src.body_multiple_params.{request.param}") client = TestClient(mod.app) return client def test_post_all(client: TestClient): response = client.put( "/items/5", json={ "item": { "name": "Foo", "price": 50.5, "description": "Some Foo", "tax": 0.1, }, }, )
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 8.9K bytes - Click Count (0) -
docs_src/dependencies/tutorial002_py310.py
self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons: CommonQueryParams = Depends(CommonQueryParams)): response = {} if commons.q: response.update({"q": commons.q}) items = fake_items_db[commons.skip : commons.skip + commons.limit] response.update({"items": items})Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 624 bytes - Click Count (0) -
docs_src/dependencies/tutorial004_py310.py
self.q = q self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons: CommonQueryParams = Depends()): response = {} if commons.q: response.update({"q": commons.q}) items = fake_items_db[commons.skip : commons.skip + commons.limit] response.update({"items": items})Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 607 bytes - Click Count (0)