- Sort Score
- Result 10 results
- Languages All
Results 451 - 460 of 2,056 for App (0.02 sec)
-
tests/test_response_model_sub_types.py
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 @app.get("/valid4", responses={"500": {"model": List[Model]}}) def valid4():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 5.3K bytes - Viewed (0) -
docs_src/security/tutorial005_py39.py
expires_delta=access_token_expires, ) return Token(access_token=access_token, token_type="bearer") @app.get("/users/me/", response_model=User) async def read_users_me(current_user: User = Depends(get_current_active_user)): return current_user @app.get("/users/me/items/") async def read_own_items( current_user: User = Security(get_current_active_user, scopes=["items"]), ):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 5.2K bytes - Viewed (0) -
docs_src/path_operation_configuration/tutorial002_py310.py
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: set[str] = set() @app.post("/items/", response_model=Item, tags=["items"]) async def create_item(item: Item): return item @app.get("/items/", tags=["items"]) async def read_items():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 537 bytes - Viewed (0) -
docs/em/docs/advanced/testing-dependencies.md
๐ ๐ฒ ๐ ๐ฏ ๐ข ๐โ๐ฆบ ๐, โ๏ธ ๐ซ ๐ฏ ๐ค โซ๏ธ ๐ ๐ฏ ๐ ๐. ๐ ๐ผ, ๐ ๐ช ๐ ๐ ๐ ๐ค ๐ ๐โ๐ฆบ, & โ๏ธ ๐ ๐ ๐ ๐จ ๐ ๐ฉโ๐ป, ๐ด ๐ ๐ฏ. ### โ๏ธ `app.dependency_overrides` ๐ข ๐ซ ๐ผ, ๐ **FastAPI** ๐ธ โ๏ธ ๐ข `app.dependency_overrides`, โซ๏ธ ๐ `dict`. ๐ ๐ ๐ฌ, ๐ ๐ฎ ๐ โฎ๏ธ ๐ (๐ข), & ๐ฒ, ๐ ๐ ๐ (โ1๏ธโฃ ๐ข). & โคด๏ธ **FastAPI** ๐ ๐ค ๐ ๐ โฉ๏ธ โฎ๏ธ ๐. ```Python hl_lines="28-29 32"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.7K bytes - Viewed (0) -
tests/test_additional_responses_default_validationerror.py
from fastapi import FastAPI from fastapi.testclient import TestClient app = FastAPI() @app.get("/a/{id}") async def a(id): pass # pragma: no cover client = TestClient(app) def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"},
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.8K bytes - Viewed (0) -
tests/test_duplicate_models_openapi.py
from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class Model(BaseModel): pass class Model2(BaseModel): a: Model class Model3(BaseModel): c: Model d: Model2 @app.get("/", response_model=Model3) def f(): return {"c": {}, "d": {"a": {}}} client = TestClient(app) def test_get_api_route(): response = client.get("/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
docs/ko/docs/tutorial/response-status-code.md
# ์๋ต ์ํ ์ฝ๋ ์๋ต ๋ชจ๋ธ๊ณผ ๊ฐ์ ๋ฐฉ๋ฒ์ผ๋ก, ์ด๋ค *๊ฒฝ๋ก ์๋*์ด๋ `status_code` ๋งค๊ฐ๋ณ์๋ฅผ ์ฌ์ฉํ์ฌ ์๋ต์ ๋ํ HTTP ์ํ ์ฝ๋๋ฅผ ์ ์ธํ ์ ์์ต๋๋ค. * `@app.get()` * `@app.post()` * `@app.put()` * `@app.delete()` * ๊ธฐํ ```Python hl_lines="6" {!../../docs_src/response_status_code/tutorial001.py!} ``` /// note | "์ฐธ๊ณ " `status_code` ๋ "๋ฐ์ฝ๋ ์ดํฐ" ๋ฉ์๋(`get`, `post` ๋ฑ)์ ๋งค๊ฐ๋ณ์์ ๋๋ค. ๋ชจ๋ ๋งค๊ฐ๋ณ์๋ค๊ณผ ๋ณธ๋ฌธ์ฒ๋ผ *๊ฒฝ๋ก ์๋ ํจ์*๊ฐ ์๋๋๋ค. /// `status_code` ๋งค๊ฐ๋ณ์๋ HTTP ์ํ ์ฝ๋๋ฅผ ์ซ์๋ก ์ ๋ ฅ๋ฐ์ต๋๋ค.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.8K bytes - Viewed (0) -
tests/test_tutorial/test_behind_a_proxy/test_tutorial002.py
from fastapi.testclient import TestClient from docs_src.behind_a_proxy.tutorial002 import app client = TestClient(app) def test_main(): response = client.get("/app") assert response.status_code == 200 assert response.json() == {"message": "Hello World", "root_path": "/api/v1"} def test_openapi(): response = client.get("/openapi.json") assert response.status_code == 200 assert response.json() == {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1K bytes - Viewed (0) -
docs/em/docs/tutorial/debugging.md
</div> โ๏ธ ๐ซ ๐ค ๐โ โ1๏ธโฃ ๐ ๐ โซ๏ธ, ๐: ```Python from myapp import app ``` #### ๐ โน โก๏ธ ๐ฌ ๐ ๐ ๐ `myapp.py`. ๐ฅ ๐ ๐ โซ๏ธ โฎ๏ธ: <div class="termy"> ```console $ python myapp.py ``` </div> โคด๏ธ ๐ ๐ข `__name__` ๐ ๐, โ ๐ ๐, ๐ โ๏ธ ๐ฒ ๐ป `"__main__"`. , ๐: ```Python uvicorn.run(app, host="0.0.0.0", port=8000) ``` ๐ ๐. ---
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.1K bytes - Viewed (0) -
docs/de/docs/tutorial/first-steps.md
Dies ist der โ**Pfadoperation-Dekorator**โ. /// Sie kรถnnen auch die anderen Operationen verwenden: * `@app.post()` * `@app.put()` * `@app.delete()` Oder die exotischeren: * `@app.options()` * `@app.head()` * `@app.patch()` * `@app.trace()` /// tip | "Tipp" Es steht Ihnen frei, jede Operation (HTTP-Methode) so zu verwenden, wie Sie es mรถchten.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.5K bytes - Viewed (0)