- Sort Score
- Result 10 results
- Languages All
Results 1121 - 1130 of 2,000 for Fastapi (0.05 sec)
-
docs/tr/docs/advanced/wsgi.md
# WSGI - Flask, Django ve Daha Fazlasını FastAPI ile Kullanma WSGI uygulamalarını [Sub Applications - Mounts](sub-applications.md){.internal-link target=_blank}, [Behind a Proxy](behind-a-proxy.md){.internal-link target=_blank} bölümlerinde gördüğünüz gibi bağlayabilirsiniz. Bunun için `WSGIMiddleware` ile Flask, Django vb. WSGI uygulamanızı sarmalayabilir ve FastAPI'ya bağlayabilirsiniz. ## `WSGIMiddleware` Kullanımı `WSGIMiddleware`'ı projenize dahil edin.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.3K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial001_an_py39.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.security.tutorial001_an_py39 import app client = TestClient(app) return client @needs_py39 def test_no_token(client: TestClient): response = client.get("/items") assert response.status_code == 401, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
docs/de/docs/tutorial/index.md
Die Verwendung in Ihrem eigenen Editor zeigt Ihnen die Vorteile von FastAPI am besten, wenn Sie sehen, wie wenig Code Sie schreiben müssen, all die Typprüfungen, die automatische Vervollständigung usw. --- ## FastAPI installieren Der erste Schritt besteht aus der Installation von FastAPI. Für dieses Tutorial empfiehlt es sich, FastAPI mit allen optionalen Abhängigkeiten und Funktionen zu installieren: <div class="termy">
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 3K bytes - Viewed (0) -
tests/test_callable_endpoint.py
from functools import partial from typing import Optional from fastapi import FastAPI from fastapi.testclient import TestClient def main(some_arg, q: Optional[str] = None): return {"some_arg": some_arg, "q": q} endpoint = partial(main, "foo") app = FastAPI() app.get("/")(endpoint) client = TestClient(app) def test_partial(): response = client.get("/?q=bar") data = response.json()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Jun 28 18:13:30 UTC 2020 - 457 bytes - Viewed (0) -
docs/zh/docs/tutorial/debugging.md
/// ## 使用你的调试器运行代码 由于是从代码直接运行的 Uvicorn 服务器,所以你可以从调试器直接调用 Python 程序(你的 FastAPI 应用)。 --- 例如,你可以在 Visual Studio Code 中: * 进入到「调试」面板。 * 「添加配置...」。 * 选中「Python」 * 运行「Python:当前文件(集成终端)」选项的调试器。 然后它会使用你的 **FastAPI** 代码开启服务器,停在断点处,等等。 看起来可能是这样: <img src="/img/tutorial/debugging/image01.png"> --- 如果使用 Pycharm,你可以:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.4K bytes - Viewed (0) -
docs/zh/docs/advanced/response-directly.md
# 直接返回响应 当你创建一个 **FastAPI** *路径操作* 时,你可以正常返回以下任意一种数据:`dict`,`list`,Pydantic 模型,数据库模型等等。 **FastAPI** 默认会使用 `jsonable_encoder` 将这些类型的返回值转换成 JSON 格式,`jsonable_encoder` 在 [JSON 兼容编码器](../tutorial/encoder.md){.internal-link target=_blank} 中有阐述。 然后,**FastAPI** 会在后台将这些兼容 JSON 的数据(比如字典)放到一个 `JSONResponse` 中,该 `JSONResponse` 会用来发送响应给客户端。 但是你可以在你的 *路径操作* 中直接返回一个 `JSONResponse`。 直接返回响应可能会有用处,比如返回自定义的响应头和 cookies。 ## 返回 `Response`
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.1K bytes - Viewed (0) -
docs_src/events/tutorial003.py
from fastapi import FastAPI def fake_answer_to_everything_ml_model(x: float): return x * 42 ml_models = {} @asynccontextmanager async def lifespan(app: FastAPI): # Load the ML model ml_models["answer_to_everything"] = fake_answer_to_everything_ml_model yield # Clean up the ML models and release the resources ml_models.clear() app = FastAPI(lifespan=lifespan)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 07 15:46:00 UTC 2023 - 569 bytes - Viewed (0) -
docs/en/docs/deployment/server-workers.md
/// ## Multiple Workers You can start multiple workers with the `--workers` command line option: //// tab | `fastapi` If you use the `fastapi` command: <div class="termy"> ```console $ <pre> <font color="#4E9A06">fastapi</font> run --workers 4 <u style="text-decoration-style:single">main.py</u> <font color="#3465A4">INFO </font> Using path <font color="#3465A4">main.py</font>
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Sep 18 16:09:57 UTC 2024 - 8.7K bytes - Viewed (0) -
.github/actions/people/app/main.py
github_graphql_url = "https://api.github.com/graphql" questions_category_id = "MDE4OkRpc2N1c3Npb25DYXRlZ29yeTMyMDAxNDM0" discussions_query = """ query Q($after: String, $category_id: ID) { repository(name: "fastapi", owner: "fastapi") { discussions(first: 100, after: $after, categoryId: $category_id) { edges { cursor node { number author { login avatarUrl
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 17 04:13:50 UTC 2024 - 19.2K bytes - Viewed (1) -
docs/de/docs/tutorial/security/simple-oauth2.md
* Ein optionales `client_secret` (benötigen wir für unser Beispiel nicht). /// info `OAuth2PasswordRequestForm` ist keine spezielle Klasse für **FastAPI**, so wie `OAuth2PasswordBearer`. `OAuth2PasswordBearer` lässt **FastAPI** wissen, dass es sich um ein Sicherheitsschema handelt. Daher wird es auf diese Weise zu OpenAPI hinzugefügt.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 14.1K bytes - Viewed (0)