- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for 1003 (0.17 sec)
-
docs_src/path_params_numeric_validations/tutorial006.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Mar 10 18:49:18 GMT 2023 - 345 bytes - Viewed (0) -
docs_src/advanced_middleware/tutorial003.py
from fastapi import FastAPI from fastapi.middleware.gzip import GZipMiddleware app = FastAPI() app.add_middleware(GZipMiddleware, minimum_size=1000) @app.get("/") async def main():
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 213 bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial005_an.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 341 bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial005_an_py39.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 331 bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial001_an_py39.py
price: float tax: Union[float, None] = None @app.put("/items/{item_id}") async def update_item( item_id: Annotated[int, Path(title="The ID of the item to get", ge=0, le=1000)], q: Union[str, None] = None, item: Union[Item, None] = None, ): results = {"item_id": item_id} if q: results.update({"q": q}) if item: results.update({"item": item})
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 610 bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial005.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 298 bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial006_an_py39.py
from fastapi import FastAPI, Path, Query app = FastAPI() @app.get("/items/{item_id}") async def read_items( *, item_id: Annotated[int, Path(title="The ID of the item to get", ge=0, le=1000)], q: str, size: Annotated[float, Query(gt=0, lt=10.5)], ): results = {"item_id": item_id} if q: results.update({"q": q})
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 395 bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial001_an.py
price: float tax: Union[float, None] = None @app.put("/items/{item_id}") async def update_item( item_id: Annotated[int, Path(title="The ID of the item to get", ge=0, le=1000)], q: Union[str, None] = None, item: Union[Item, None] = None, ): results = {"item_id": item_id} if q: results.update({"q": q}) if item: results.update({"item": item})
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 639 bytes - Viewed (0) -
tests/test_tutorial/test_custom_request_and_route/test_tutorial001.py
return {"request_class": type(request).__name__} client = TestClient(app) @pytest.mark.parametrize("compress", [True, False]) def test_gzip_request(compress): n = 1000 headers = {} body = [1] * n data = json.dumps(body).encode() if compress: data = gzip.compress(data) headers["Content-Encoding"] = "gzip" headers["Content-Type"] = "application/json"
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Nov 13 14:26:09 GMT 2022 - 886 bytes - Viewed (0) -
docs/zh/docs/deployment/docker.md
如果你的 FastAPI 是单个文件,例如没有`./app`目录的`main.py`,则你的文件结构可能如下所示: ``` . ├── Dockerfile ├── main.py └── requirements.txt ``` 然后你只需更改相应的路径即可将文件复制到`Dockerfile`中: ```{ .dockerfile .annotate hl_lines="10 13" } FROM python:3.9 WORKDIR /code COPY ./requirements.txt /code/requirements.txt RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt # (1) COPY ./main.py /code/ # (2)
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 31.2K bytes - Viewed (0)