- Sort Score
- Result 10 results
- Languages All
Results 861 - 870 of 890 for docs_src (0.28 sec)
-
tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py
import pytest from dirty_equals import IsDict from fastapi import FastAPI from fastapi.testclient import TestClient @pytest.fixture(name="app") def get_app(): from docs_src.request_forms_and_files.tutorial001 import app return app @pytest.fixture(name="client") def get_client(app: FastAPI): client = TestClient(app) return client def test_post_form_no_body(client: TestClient):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 9.8K bytes - Viewed (0) -
tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an_py39.py
import pytest from dirty_equals import IsDict from fastapi import FastAPI from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="app") def get_app(): from docs_src.request_forms_and_files.tutorial001_an_py39 import app return app @pytest.fixture(name="client") def get_client(app: FastAPI): client = TestClient(app) return client @needs_py39
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 9.9K bytes - Viewed (0) -
docs/ja/docs/tutorial/debugging.md
# デバッグ Visual Studio CodeやPyCharmなどを使用して、エディター上でデバッガーと連携できます。 ## `uvicorn` の実行 FastAPIアプリケーション上で、`uvicorn` を直接インポートして実行します: ```Python hl_lines="1 15" {!../../docs_src/debugging/tutorial001.py!} ``` ### `__name__ == "__main__"` について `__name__ == "__main__"` の主な目的は、ファイルが次のコマンドで呼び出されたときに実行されるコードを用意することです: <div class="termy"> ```console $ python myapp.py ``` </div>
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3K bytes - Viewed (0) -
docs/de/docs/contributing.md
In den meisten Fällen handelt es sich bei diesen Codeblöcken um vollständige Anwendungen, die unverändert ausgeführt werden können. Tatsächlich sind diese Codeblöcke nicht Teil des Markdowns, sondern Python-Dateien im Verzeichnis `./docs_src/`. Und diese Python-Dateien werden beim Generieren der Site in die Dokumentation eingefügt. ### Dokumentation für Tests Tatsächlich arbeiten die meisten Tests mit den Beispielquelldateien in der Dokumentation.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 16.1K bytes - Viewed (0) -
docs/pt/docs/tutorial/cors.md
* Métodos HTTP específicos (`POST`, `PUT`) ou todos eles com o curinga `"*"`. * Cabeçalhos HTTP específicos ou todos eles com o curinga `"*"`. ```Python hl_lines="2 6-11 13-19" {!../../docs_src/cors/tutorial001.py!} ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.5K bytes - Viewed (0) -
docs/ja/docs/tutorial/security/oauth2-jwt.md
新しいアクセストークンを生成するユーティリティ関数を作成します。 ```Python hl_lines="6 12-14 28-30 78-86" {!../../docs_src/security/tutorial004.py!} ``` ## 依存関係の更新 `get_current_user`を更新して、先ほどと同じトークンを受け取るようにしますが、今回はJWTトークンを使用します。 受け取ったトークンを復号して検証し、現在のユーザーを返します。 トークンが無効な場合は、すぐにHTTPエラーを返します。 ```Python hl_lines="89-106" {!../../docs_src/security/tutorial004.py!} ``` ## `/token` パスオペレーションの更新
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 14.1K bytes - Viewed (1) -
tests/test_tutorial/test_sql_databases/test_tutorial001.py
clear_sqlmodel() # TODO: remove when updating SQL tutorial to use new lifespan API with warnings.catch_warnings(record=True): warnings.simplefilter("always") mod = importlib.import_module(f"docs_src.sql_databases.{request.param}") clear_sqlmodel() importlib.reload(mod) mod.sqlite_url = "sqlite://" mod.engine = create_engine(
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 14.8K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005.py
from dirty_equals import IsDict, IsOneOf from fastapi.testclient import TestClient from docs_src.security.tutorial005 import ( app, create_access_token, fake_users_db, get_password_hash, verify_password, ) client = TestClient(app) def get_access_token(username="johndoe", password="secret", scope=None): data = {"username": username, "password": password} if scope: data["scope"] = scope
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 15.4K bytes - Viewed (0) -
docs/en/docs/contributing.md
In most of the cases, these blocks of code are actual complete applications that can be run as is. In fact, those blocks of code are not written inside the Markdown, they are Python files in the `./docs_src/` directory. And those Python files are included/injected in the documentation when generating the site. ### Docs for tests Most of the tests actually run against the example source files in the documentation.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Aug 25 02:44:06 UTC 2024 - 12.7K bytes - Viewed (0) -
docs/en/docs/tutorial/cors.md
* Specific HTTP methods (`POST`, `PUT`) or all of them with the wildcard `"*"`. * Specific HTTP headers or all of them with the wildcard `"*"`. ```Python hl_lines="2 6-11 13-19" {!../../docs_src/cors/tutorial001.py!} ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.1K bytes - Viewed (0)