- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 66 for Dadd (0.42 sec)
-
fastapi/dependencies/utils.py
if is_body_param(param_field=param_field, is_path_param=is_path_param): dependant.body_params.append(param_field) else: add_param_to_fields(field=param_field, dependant=dependant) return dependant def add_non_field_param_to_dependency( *, param_name: str, type_annotation: Any, dependant: Dependant ) -> Optional[bool]: if lenient_issubclass(type_annotation, Request):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:52:56 GMT 2024 - 29.5K bytes - Viewed (0) -
tests/main.py
app = FastAPI() @app.api_route("/api_route") def non_operation(): return {"message": "Hello World"} def non_decorated_route(): return {"message": "Hello World"} app.add_api_route("/non_decorated_route", non_decorated_route) @app.get("/text") def get_text(): return "Hello World" @app.get("/path/{item_id}") def get_id(item_id): return item_id
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 21:56:59 GMT 2024 - 4.3K bytes - Viewed (0) -
docs/en/docs/tutorial/path-params-numeric-validations.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 16:31:18 GMT 2024 - 9.1K bytes - Viewed (0) -
fastapi/openapi/utils.py
) file_name = getattr(route.endpoint, "__globals__", {}).get("__file__") if file_name: message += f" at {file_name}" warnings.warn(message, stacklevel=1) operation_ids.add(operation_id) operation["operationId"] = operation_id if route.deprecated: operation["deprecated"] = route.deprecated return operation def get_openapi_path( *,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 21.8K bytes - Viewed (0) -
docs/em/docs/deployment/docker.md
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt COPY ./app /code/app CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"] # If running behind a proxy like Nginx or Traefik add --proxy-headers # CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80", "--proxy-headers"] ``` </details> ## ⚫️❔ 📦
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 27.9K bytes - Viewed (0) -
fastapi/background.py
@app.post("/send-notification/{email}") async def send_notification(email: str, background_tasks: BackgroundTasks): background_tasks.add_task(write_notification, email, message="some notification") return {"message": "Notification sent in the background"} ``` """ def add_task( self, func: Annotated[ Callable[P, Any], Doc( """
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 1.7K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_middleware.py
assert response.status_code == 400, response.text # TODO: pv2 add version with Pydantic v2 @needs_pydanticv1 def test_get_user(client): response = client.get("/users/1") assert response.status_code == 200, response.text data = response.json() assert "email" in data assert "id" in data # TODO: pv2 add version with Pydantic v2 @needs_pydanticv1 def test_nonexistent_user(client):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.3K bytes - Viewed (0) -
docs/ja/docs/deployment/docker.md
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt COPY ./app /code/app CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"] # If running behind a proxy like Nginx or Traefik add --proxy-headers # CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80", "--proxy-headers"] ``` </details> ## コンテナとは何か
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 44.3K bytes - Viewed (0) -
docs/zh/docs/advanced/middleware.md
``` 但 FastAPI(实际上是 Starlette)提供了一种更简单的方式,能让内部中间件在处理服务器错误的同时,还能让自定义异常处理器正常运作。 为此,要使用 `app.add_middleware()` (与 CORS 中的示例一样)。 ```Python from fastapi import FastAPI from unicorn import UnicornMiddleware app = FastAPI() app.add_middleware(UnicornMiddleware, some_config="rainbow") ``` `app.add_middleware()` 的第一个参数是中间件的类,其它参数则是要传递给中间件的参数。 ## 集成中间件 **FastAPI** 为常见用例提供了一些中间件,下面介绍怎么使用这些中间件。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 22:44:27 GMT 2024 - 3.6K bytes - Viewed (0) -
docs/ru/docs/tutorial/background-tasks.md
{!../../../docs_src/background_tasks/tutorial001.py!} ``` ## Добавление фоновой задачи Внутри функции вызовите метод `.add_task()` у объекта *background tasks* и передайте ему функцию, которую хотите выполнить в фоне: ```Python hl_lines="14" {!../../../docs_src/background_tasks/tutorial001.py!} ``` `.add_task()` принимает следующие аргументы:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 09 15:52:07 GMT 2024 - 8K bytes - Viewed (0)