- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 102 for score (0.17 sec)
-
tests/test_tutorial/test_security/test_tutorial005_an_py39.py
client = TestClient(app) return client def get_access_token( *, username="johndoe", password="secret", scope=None, client: TestClient ): data = {"username": username, "password": password} if scope: data["scope"] = scope response = client.post("/token", data=data) content = response.json() access_token = content.get("access_token") return access_token
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) -
tests/test_tutorial/test_security/test_tutorial005_py310.py
client = TestClient(app) return client def get_access_token( *, username="johndoe", password="secret", scope=None, client: TestClient ): data = {"username": username, "password": password} if scope: data["scope"] = scope response = client.post("/token", data=data) content = response.json() access_token = content.get("access_token") return access_token
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) -
tests/test_tutorial/test_async_sql_databases/test_tutorial001.py
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from ...utils import needs_pydanticv1 @pytest.fixture(name="app", scope="module") def get_app(): with pytest.warns(DeprecationWarning): from docs_src.async_sql_databases.tutorial001 import app yield app # TODO: pv2 add version with Pydantic v2 @needs_pydanticv1 def test_create_read(app: FastAPI):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Oct 18 12:36:40 GMT 2023 - 6K bytes - Viewed (0) -
docs/zh/docs/advanced/async-sql-databases.md
* 导入 `SQLAlchemy` * 创建 `metadata` 对象 * 使用 `metadata` 对象创建 `notes` 表 ```Python hl_lines="4 14 16-22" {!../../../docs_src/async_sql_databases/tutorial001.py!} ``` !!! tip "提示" 注意,上例是都是纯 SQLAlchemy Core 代码。 `databases` 还没有进行任何操作。 ## 导入并设置 `databases` * 导入 `databases` * 创建 `DATABASE_URL` * 创建 `database` ```Python hl_lines="3 9 12" {!../../../docs_src/async_sql_databases/tutorial001.py!}
Plain Text - Registered: Sun Mar 31 07:19:09 GMT 2024 - Last Modified: Sat Mar 30 22:44:40 GMT 2024 - 4.3K bytes - Viewed (0) -
docs/en/docs/advanced/events.md
Doing that in separated functions that don't share logic or variables together is more difficult as you would need to store values in global variables or similar tricks. Because of that, it's now recommended to instead use the `lifespan` as explained above. ## Technical Details Just a technical detail for the curious nerds. 🤓
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 7.8K bytes - Viewed (0) -
docs/en/docs/how-to/custom-docs-ui-assets.md
### Project file structure Let's say your project file structure looks like this: ``` . ├── app │ ├── __init__.py │ ├── main.py ``` Now create a directory to store those static files. Your new file structure could look like this: ``` . ├── app │ ├── __init__.py │ ├── main.py └── static/ ``` ### Download the files
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Mon Oct 30 09:58:58 GMT 2023 - 7.5K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py39.py
import importlib import os from pathlib import Path import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py39, needs_pydanticv1 @pytest.fixture(scope="module") def client(tmp_path_factory: pytest.TempPathFactory): tmp_path = tmp_path_factory.mktemp("data") cwd = os.getcwd() os.chdir(tmp_path) test_db = Path("./sql_app.db")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.5K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_py310.py
import importlib import os from pathlib import Path import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py310, needs_pydanticv1 @pytest.fixture(scope="module", name="client") def get_client(tmp_path_factory: pytest.TempPathFactory): tmp_path = tmp_path_factory.mktemp("data") cwd = os.getcwd() os.chdir(tmp_path) test_db = Path("./sql_app.db")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.5K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_py39.py
import importlib import os from pathlib import Path import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py39, needs_pydanticv1 @pytest.fixture(scope="module", name="client") def get_client(tmp_path_factory: pytest.TempPathFactory): tmp_path = tmp_path_factory.mktemp("data") cwd = os.getcwd() os.chdir(tmp_path) test_db = Path("./sql_app.db")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.5K bytes - Viewed (0) -
docs/em/docs/advanced/behind-a-proxy.md
!!! note "📡 ℹ" 🔫 🔧 🔬 `root_path` 👉 ⚙️ 💼. & `--root-path` 📋 ⏸ 🎛 🚚 👈 `root_path`. ### ✅ ⏮️ `root_path` 👆 💪 🤚 ⏮️ `root_path` ⚙️ 👆 🈸 🔠 📨, ⚫️ 🍕 `scope` 📖 (👈 🍕 🔫 🔌). 📥 👥 ✅ ⚫️ 📧 🎦 🎯. ```Python hl_lines="8" {!../../../docs_src/behind_a_proxy/tutorial001.py!} ``` ⤴️, 🚥 👆 ▶️ Uvicorn ⏮️: <div class="termy"> ```console
Plain Text - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 10.1K bytes - Viewed (0)