- Sort Score
- Result 10 results
- Languages All
Results 331 - 340 of 1,655 for items (0.07 sec)
-
tests/test_tutorial/test_cookie_params/test_tutorial001_py310.py
"path,cookies,expected_status,expected_response", [ ("/items", None, 200, {"ads_id": None}), ("/items", {"ads_id": "ads_track"}, 200, {"ads_id": "ads_track"}), ( "/items", {"ads_id": "ads_track", "session": "cookiesession"}, 200, {"ads_id": "ads_track"}, ), ("/items", {"session": "cookiesession"}, 200, {"ads_id": None}), ], )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.1K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial011_an_py310.py
return client @needs_py310 def test_multi_query_values(client: TestClient): url = "/items/?q=foo&q=bar" response = client.get(url) assert response.status_code == 200, response.text assert response.json() == {"q": ["foo", "bar"]} @needs_py310 def test_query_no_values(client: TestClient): url = "/items/" response = client.get(url) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.1K bytes - Viewed (0) -
docs_src/security/tutorial005_an_py310.py
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto") oauth2_scheme = OAuth2PasswordBearer( tokenUrl="token", scopes={"me": "Read information about the current user.", "items": "Read items."}, ) app = FastAPI() def verify_password(plain_password, hashed_password): return pwd_context.verify(plain_password, hashed_password) def get_password_hash(password):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 5.2K bytes - Viewed (0) -
docs_src/security/tutorial005_an_py39.py
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto") oauth2_scheme = OAuth2PasswordBearer( tokenUrl="token", scopes={"me": "Read information about the current user.", "items": "Read items."}, ) app = FastAPI() def verify_password(plain_password, hashed_password): return pwd_context.verify(plain_password, hashed_password) def get_password_hash(password):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 5.3K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_an.py
assert response.status_code == 400, response.text assert response.json() == {"detail": "Inactive user"} def test_read_items(): access_token = get_access_token(scope="me items") response = client.get( "/users/me/items/", headers={"Authorization": f"Bearer {access_token}"} ) assert response.status_code == 200, response.text assert response.json() == [{"item_id": "Foo", "owner": "johndoe"}]
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 15.4K bytes - Viewed (0) -
src/main/config/openapi/openapi-user.yaml
type: array items: type: string example: ["aaa"] related_contents: type: array items: type: string example: [] data: type: array items: type: object
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu May 09 06:31:27 UTC 2024 - 21.6K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/suggest/request/suggest/SuggestResponse.java
protected final List<SuggestItem> items; public SuggestResponse(final String index, final long tookMs, final List<String> words, final long total, final List<SuggestItem> items) { this.index = index; this.tookMs = tookMs; this.words = words; num = words.size(); this.total = total; this.items = items; } public String getIndex() {
Registered: Fri Nov 08 09:08:12 UTC 2024 - Last Modified: Sat Oct 12 00:10:39 UTC 2024 - 1.7K bytes - Viewed (0) -
docs/zh/docs/advanced/security/oauth2-scopes.md
{!../../docs_src/security/tutorial005.py!} ``` ## 在*路径操作*与依赖项中声明作用域 接下来,为*路径操作* `/users/me/items/` 声明作用域 `items`。 为此,要从 `fastapi` 中导入并使用 `Security` 。 `Security` 声明依赖项的方式和 `Depends` 一样,但 `Security` 还能接收作用域(字符串)列表类型的参数 `scopes`。 此处使用与 `Depends` 相同的方式,把依赖项函数 `get_current_active_user` 传递给 `Security`。 同时,还传递了作用域**列表**,本例中只传递了一个作用域:`items`(此处支持传递更多作用域)。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.8K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008b.py
from docs_src.dependencies.tutorial008b import app client = TestClient(app) def test_get_no_item(): response = client.get("/items/foo") assert response.status_code == 404, response.text assert response.json() == {"detail": "Item not found"} def test_owner_error(): response = client.get("/items/plumbus") assert response.status_code == 400, response.text assert response.json() == {"detail": "Owner error: Rick"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Dec 26 20:37:34 UTC 2023 - 697 bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial003_an.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 7.1K bytes - Viewed (0)