- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for Exported (0.24 sec)
-
docs/en/docs/tutorial/body-fields.md
!!! tip Prefer to use the `Annotated` version if possible. ```Python hl_lines="4" {!> ../../../docs_src/body_fields/tutorial001.py!} ``` !!! warning Notice that `Field` is imported directly from `pydantic`, not from `fastapi` as are all the rest (`Query`, `Path`, `Body`, etc). ## Declare model attributes You can then use `Field` with model attributes: === "Python 3.10+"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 3.6K bytes - Viewed (0) -
docs/en/docs/release-notes.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri May 03 23:25:42 GMT 2024 - 388.1K bytes - Viewed (1) -
docs/en/docs/tutorial/bigger-applications.md
We are importing the submodule `items` directly, instead of importing just its variable `router`. This is because we also have another variable named `router` in the submodule `users`. If we had imported one after the other, like: ```Python from .routers.items import router from .routers.users import router ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 18.6K bytes - Viewed (0) -
docs/en/docs/python-types.md
```Python hl_lines="1" {!> ../../../docs_src/python_types/tutorial006.py!} ``` Declare the variable, with the same colon (`:`) syntax. As the type, put the `List` that you imported from `typing`. As the list is a type that contains some internal types, you put them in square brackets: ```Python hl_lines="4" {!> ../../../docs_src/python_types/tutorial006.py!} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 17K bytes - Viewed (0) -
docs/zh/docs/deployment/docker.md
你还可能有**其他原因**,这将使你更容易拥有一个带有**多个进程**的**单个容器**,而不是拥有每个容器中都有**单个进程**的**多个容器**。 例如(取决于你的设置)你可以在同一个容器中拥有一些工具,例如 Prometheus exporter,该工具应该有权访问**每个请求**。 在这种情况下,如果你有**多个容器**,默认情况下,当 Prometheus 来**读取metrics**时,它每次都会获取**单个容器**的metrics(对于处理该特定请求的容器),而不是获取所有复制容器的**累积metrics**。 在这种情况, 这种做法会更加简单:让**一个容器**具有**多个进程**,并在同一个容器上使用本地工具(例如 Prometheus exporter)收集所有内部进程的 Prometheus 指标并公开单个容器上的这些指标。 ---
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 31.2K bytes - Viewed (0) -
docs/en/docs/advanced/security/oauth2-scopes.md
We also declare a special parameter of type `SecurityScopes`, imported from `fastapi.security`. This `SecurityScopes` class is similar to `Request` (`Request` was used to get the request object directly). === "Python 3.10+" ```Python hl_lines="8 105"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 21:21:35 GMT 2024 - 20.5K bytes - Viewed (0) -
docs/en/docs/reference/middleware.md
::: fastapi.middleware.cors.CORSMiddleware It can be imported from `fastapi`: ```python from fastapi.middleware.cors import CORSMiddleware ``` ::: fastapi.middleware.gzip.GZipMiddleware It can be imported from `fastapi`: ```python from fastapi.middleware.gzip import GZipMiddleware ``` ::: fastapi.middleware.httpsredirect.HTTPSRedirectMiddleware It can be imported from `fastapi`: ```python
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 991 bytes - Viewed (0) -
docs/en/docs/reference/exceptions.md
You can use: * `HTTPException` * `WebSocketException` These exceptions can be imported directly from `fastapi`: ```python from fastapi import HTTPException, WebSocketException ``` ::: fastapi.HTTPException
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 597 bytes - Viewed (0) -
docs/en/docs/tutorial/sql-databases.md
We name it `SessionLocal` to distinguish it from the `Session` we are importing from SQLAlchemy. We will use `Session` (the one imported from SQLAlchemy) later. To create the `SessionLocal` class, use the function `sessionmaker`: ```Python hl_lines="11" {!../../../docs_src/sql_databases/sql_app/database.py!} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 29.6K bytes - Viewed (0) -
docs/en/docs/tutorial/background-tasks.md
## Technical Details The class `BackgroundTasks` comes directly from <a href="https://www.starlette.io/background/" class="external-link" target="_blank">`starlette.background`</a>. It is imported/included directly into FastAPI so that you can import it from `fastapi` and avoid accidentally importing the alternative `BackgroundTask` (without the `s` at the end) from `starlette.background`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 5.6K bytes - Viewed (0)