- Sort Score
- Result 10 results
- Languages All
Results 751 - 760 of 1,080 for Str (0.01 sec)
-
docs_src/dependencies/tutorial004_py310.py
from fastapi import Depends, FastAPI app = FastAPI() fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] class CommonQueryParams: def __init__(self, q: str | None = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons: CommonQueryParams = Depends()): response = {}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 607 bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial003_py39.py
return html @pytest.fixture(name="client") def get_client(app: FastAPI): client = TestClient(app) return client @needs_py39 def test_get(client: TestClient, html: str): response = client.get("/") assert response.text == html @needs_py39 def test_websocket_handle_disconnection(client: TestClient):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 1.3K bytes - Viewed (0) -
docs/ja/docs/tutorial/dependencies/sub-dependencies.md
**FastAPI** はそれらを解決してくれます。 ### 最初の依存関係「依存可能なもの」 以下のような最初の依存関係(「依存可能なもの」)を作成することができます: ```Python hl_lines="8 9" {!../../docs_src/dependencies/tutorial005.py!} ``` これはオプショナルのクエリパラメータ`q`を`str`として宣言し、それを返すだけです。 これは非常にシンプルです(あまり便利ではありません)が、サブ依存関係がどのように機能するかに焦点を当てるのに役立ちます。 ### 第二の依存関係 「依存可能なもの」と「依存」 そして、別の依存関数(「依存可能なもの」)を作成して、同時にそれ自身の依存関係を宣言することができます(つまりそれ自身も「依存」です): ```Python hl_lines="13"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.4K bytes - Viewed (0) -
src/main/java/jcifs/util/Encdec.java
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Jul 01 13:12:10 UTC 2018 - 11K bytes - Viewed (0) -
docs_src/dependencies/tutorial003.py
from fastapi import Depends, FastAPI app = FastAPI() fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] class CommonQueryParams: def __init__(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons=Depends(CommonQueryParams)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 635 bytes - Viewed (0) -
docs_src/dependencies/tutorial004_an_py310.py
from fastapi import Depends, FastAPI app = FastAPI() fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] class CommonQueryParams: def __init__(self, q: str | None = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons: Annotated[CommonQueryParams, Depends()]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 647 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial010_an.py
from typing import Union from fastapi import FastAPI, Query from typing_extensions import Annotated app = FastAPI() @app.get("/items/") async def read_items( q: Annotated[ Union[str, None], Query( alias="item-query", title="Query string", description="Query string for the items to search in the database that have a good match", min_length=3,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 664 bytes - Viewed (0) -
docs/de/docs/tutorial/security/get-current-user.md
# Aktuellen Benutzer abrufen Im vorherigen Kapitel hat das Sicherheitssystem (das auf dem Dependency Injection System basiert) der *Pfadoperation-Funktion* einen `token` vom Typ `str` überreicht: //// tab | Python 3.9+ ```Python hl_lines="12" {!> ../../docs_src/security/tutorial001_an_py39.py!} ``` //// //// tab | Python 3.8+ ```Python hl_lines="11" {!> ../../docs_src/security/tutorial001_an.py!} ``` ////
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.3K bytes - Viewed (0) -
docs/ko/docs/tutorial/security/get-current-user.md
//// tab | 파이썬 3.7 이상 ```Python hl_lines="25" {!> ../../docs_src/security/tutorial002.py!} ``` //// //// tab | 파이썬 3.10 이상 ```Python hl_lines="23" {!> ../../docs_src/security/tutorial002_py310.py!} ``` //// ## 유저 가져오기 `get_current_user`는 토큰을 `str`로 취하고 Pydantic `User` 모델을 반환하는 우리가 만든 (가짜) 유틸리티 함수를 사용합니다.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.6K bytes - Viewed (0) -
tests/test_security_oauth2.py
"scopes": {"read:users": "Read the users", "write:users": "Create users"}, } } ) class User(BaseModel): username: str # Here we use string annotations to test them def get_current_user(oauth_header: "str" = Security(reusable_oauth2)): user = User(username=oauth_header) return user @app.post("/login") # Here we use string annotations to test them
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 10.7K bytes - Viewed (0)