- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 224 for loader (0.18 sec)
-
docs/zh/docs/tutorial/header-params.md
# Header 参数 定义 `Header` 参数的方式与定义 `Query`、`Path`、`Cookie` 参数相同。 ## 导入 `Header` 首先,导入 `Header`: === "Python 3.10+" ```Python hl_lines="3" {!> ../../../docs_src/header_params/tutorial001_an_py310.py!} ``` === "Python 3.9+" ```Python hl_lines="3" {!> ../../../docs_src/header_params/tutorial001_an_py39.py!} ``` === "Python 3.8+" ```Python hl_lines="3"
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 30 22:42:51 GMT 2024 - 5.4K bytes - Viewed (0) -
docs/ru/docs/tutorial/header-params.md
# Header-параметры Вы можете определить параметры заголовка таким же образом, как вы определяете параметры `Query`, `Path` и `Cookie`. ## Импорт `Header` Сперва импортируйте `Header`: === "Python 3.10+" ```Python hl_lines="3" {!> ../../../docs_src/header_params/tutorial001_an_py310.py!} ``` === "Python 3.9+" ```Python hl_lines="3" {!> ../../../docs_src/header_params/tutorial001_an_py39.py!} ```
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 8.7K bytes - Viewed (0) -
docs/ko/docs/tutorial/header-params.md
## `Header` 임포트 먼저 `Header`를 임포트합니다: ```Python hl_lines="3" {!../../../docs_src/header_params/tutorial001.py!} ``` ## `Header` 매개변수 선언 `Path`, `Query` 그리고 `Cookie`를 사용한 동일한 구조를 이용하여 헤더 매개변수를 선언합니다. 첫 번째 값은 기본값이며, 추가 검증이나 어노테이션 매개변수 모두 전달할 수 있습니다: ```Python hl_lines="9" {!../../../docs_src/header_params/tutorial001.py!} ``` !!! note "기술 세부사항"
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu May 12 00:06:16 GMT 2022 - 3.3K bytes - Viewed (0) -
docs/en/docs/how-to/custom-request-and-route.md
First, we create a `GzipRequest` class, which will overwrite the `Request.body()` method to decompress the body in the presence of an appropriate header. If there's no `gzip` in the header, it will not try to decompress the body. That way, the same route class can handle gzip compressed or uncompressed requests. ```Python hl_lines="8-15"
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Mar 31 23:52:53 GMT 2024 - 4.4K bytes - Viewed (0) -
tests/test_params_repr.py
def test_header_repr_str(): assert repr(Header("teststr")) == "Header(teststr)" def test_header_repr_none(): assert repr(Header(None)) == "Header(None)" def test_header_repr_ellipsis(): assert repr(Header(...)) == IsOneOf( "Header(PydanticUndefined)", # TODO: remove when deprecating Pydantic v1 "Header(Ellipsis)", )
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 3.3K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial002_an_py310.py
@pytest.fixture(name="client") def get_client(): from docs_src.header_params.tutorial002_an_py310 import app client = TestClient(app) return client @needs_py310 @pytest.mark.parametrize( "path,headers,expected_status,expected_response", [ ("/items", None, 200, {"strange_header": None}), ("/items", {"X-Header": "notvalid"}, 200, {"strange_header": None}), ( "/items",
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 4.2K bytes - Viewed (0) -
tests/test_tutorial/test_handling_errors/test_tutorial002.py
from docs_src.handling_errors.tutorial002 import app client = TestClient(app) def test_get_item_header(): response = client.get("/items-header/foo") assert response.status_code == 200, response.text assert response.json() == {"item": "The Foo Wrestlers"} def test_get_item_not_found_header(): response = client.get("/items-header/bar") assert response.status_code == 404, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 3.3K bytes - Viewed (0) -
docs_src/header_params/tutorial002_an_py310.py
from typing import Annotated from fastapi import FastAPI, Header app = FastAPI() @app.get("/items/") async def read_items( strange_header: Annotated[str | None, Header(convert_underscores=False)] = None, ):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 261 bytes - Viewed (0) -
docs/en/docs/css/custom.css
*/ .screenshot { display: block; background-color: #d3e0de; border-radius: 4px; padding: 45px 5px 5px; position: relative; -webkit-box-sizing: border-box; box-sizing: border-box; } .screenshot img { display: block; border-radius: 2px; } .screenshot:before { content: ''; position: absolute; top: 15px; left: 15px;
CSS - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Jan 28 09:53:45 GMT 2024 - 2.8K bytes - Viewed (0) -
docs_src/dependencies/tutorial006_an.py
from fastapi import Depends, FastAPI, Header, HTTPException from typing_extensions import Annotated app = FastAPI() async def verify_token(x_token: Annotated[str, Header()]): if x_token != "fake-super-secret-token": raise HTTPException(status_code=400, detail="X-Token header invalid") async def verify_key(x_key: Annotated[str, Header()]): if x_key != "fake-super-secret-key":
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 643 bytes - Viewed (0)