- Sort Score
- Result 10 results
- Languages All
Results 401 - 410 of 2,381 for apps (0.03 sec)
-
docs_src/sql_databases/tutorial001_an.py
SessionDep = Annotated[Session, Depends(get_session)] app = FastAPI() @app.on_event("startup") def on_startup(): create_db_and_tables() @app.post("/heroes/") def create_hero(hero: Hero, session: SessionDep) -> Hero: session.add(hero) session.commit() session.refresh(hero) return hero @app.get("/heroes/") def read_heroes( session: SessionDep,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 1.8K bytes - Viewed (0) -
docs/pt/docs/tutorial/sql-databases.md
<div class="screenshot"> <img src="/img/tutorial/sql-databases/image01.png"> </div> ## Atualizar o App com Múltiplos Modelos Agora vamos **refatorar** este app um pouco para aumentar a **segurança** e **versatilidade**. Se você verificar o app anterior, na interface você pode ver que, até agora, ele permite que o cliente decida o `id` do `Hero` a ser criado. 😱
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 15:25:29 UTC 2024 - 15.8K bytes - Viewed (0) -
tests/test_invalid_path_param.py
app = FastAPI() @app.get("/items/{id}") def read_items(id: list): pass # pragma: no cover def test_invalid_simple_tuple(): with pytest.raises(AssertionError): app = FastAPI() @app.get("/items/{id}") def read_items(id: tuple): pass # pragma: no cover def test_invalid_simple_set(): with pytest.raises(AssertionError):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Jun 03 17:59:40 UTC 2019 - 1.7K bytes - Viewed (0) -
docs/zh/docs/advanced/behind-a-proxy.md
`root_path` 用于处理这些特定情况。 在挂载子应用时,也可以在内部使用。 ## 移除路径前缀的代理 本例中,移除路径前缀的代理是指在代码中声明路径 `/app`,然后在应用顶层添加代理,把 **FastAPI** 应用放在 `/api/v1` 路径下。 本例的原始路径 `/app` 实际上是在 `/api/v1/app` 提供服务。 哪怕所有代码都假设只有 `/app`。 代理只在把请求传送给 Uvicorn 之前才会**移除路径前缀**,让应用以为它是在 `/app` 提供服务,因此不必在代码中加入前缀 `/api/v1`。 但之后,在(前端)打开 API 文档时,代理会要求在 `/openapi.json`,而不是 `/api/v1/openapi.json` 中提取 OpenAPI 概图。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.4K bytes - Viewed (0) -
tests/test_response_model_include_exclude.py
age: int ref2: Model2 app = FastAPI() @app.get( "/simple_include", response_model=Model2, response_model_include={"baz": ..., "ref": {"foo"}}, ) def simple_include(): return Model2( ref=Model1(foo="simple_include model foo", bar="simple_include model bar"), baz="simple_include model2 baz", ) @app.get( "/simple_include_dict",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Jul 19 19:14:58 UTC 2021 - 4K bytes - Viewed (0) -
docs_src/custom_docs_ui/tutorial002.py
) from fastapi.staticfiles import StaticFiles app = FastAPI(docs_url=None, redoc_url=None) app.mount("/static", StaticFiles(directory="static"), name="static") @app.get("/docs", include_in_schema=False) async def custom_swagger_ui_html(): return get_swagger_ui_html( openapi_url=app.openapi_url, title=app.title + " - Swagger UI", oauth2_redirect_url=app.swagger_ui_oauth2_redirect_url,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 19 19:54:04 UTC 2023 - 1.1K bytes - Viewed (0) -
docs/debugging/healing-bin/main.go
"fmt" "io" "log" "os" "strings" "github.com/minio/cli" "github.com/tinylib/msgp/msgp" ) func main() { app := cli.NewApp() app.Copyright = "MinIO, Inc." app.Usage = "healing.bin to JSON" app.HideVersion = true app.HideHelpCommand = true app.CustomAppHelpTemplate = `NAME: {{.Name}} - {{.Usage}} USAGE: {{.Name}} {{if .VisibleFlags}}[FLAGS]{{end}} [HEALINGBINFILE|INSPECTZIPFILE]
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 3.2K bytes - Viewed (0) -
common-protos/k8s.io/api/scheduling/v1/generated.proto
// This file was autogenerated by go-to-protobuf. Do not edit it manually! syntax = "proto2"; package k8s.io.api.scheduling.v1; import "k8s.io/api/core/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; // Package-wide variables from generator "generated".
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Mon Mar 11 18:43:24 UTC 2024 - 2.8K bytes - Viewed (0) -
common-protos/k8s.io/api/certificates/v1beta1/generated.proto
// +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 4; // lastTransitionTime is the time the condition last transitioned from one status to another. // If unset, when a new condition type is added or an existing condition's status is changed, // the server defaults this to the current time. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 5; }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Mon Mar 11 18:43:24 UTC 2024 - 6.7K bytes - Viewed (0) -
tests/test_allow_inf_nan_in_enforcing.py
from typing_extensions import Annotated app = FastAPI() @app.post("/") async def get( x: Annotated[float, Query(allow_inf_nan=True)] = 0, y: Annotated[float, Query(allow_inf_nan=False)] = 0, z: Annotated[float, Query()] = 0, b: Annotated[float, Body(allow_inf_nan=False)] = 0, ) -> str: return "OK" client = TestClient(app) @pytest.mark.parametrize( "value,code",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 24 19:27:37 UTC 2024 - 1.8K bytes - Viewed (0)