- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 889 for path (0.37 sec)
-
tests/test_path.py
def test_path_foobar(): response = client.get("/path/foobar") assert response.status_code == 200 assert response.json() == "foobar" def test_path_str_foobar(): response = client.get("/path/str/foobar") assert response.status_code == 200 assert response.json() == "foobar" def test_path_str_42(): response = client.get("/path/str/42")
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 34.4K bytes - Viewed (0) -
docs/ja/docs/tutorial/path-params.md
### パス変換 Starletteのオプションを直接使用することで、以下のURLの様な*パス*を含んだ、*パスパラメータ*の宣言ができます: ``` /files/{file_path:path} ``` この場合、パラメータ名は `file_path` です。そして、最後の部分 `:path` はパラメータがいかなる*パス*にもマッチすることを示します。 したがって、以下の様に使用できます: ```Python hl_lines="6" {!../../../docs_src/path_params/tutorial004.py!} ``` !!! tip "豆知識" 最初のスラッシュ (`/`)が付いている `/home/johndoe/myfile.txt` をパラメータが含んでいる必要があります。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 10.6K bytes - Viewed (0) -
docs/de/docs/tutorial/path-params.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:28:59 GMT 2024 - 10.3K bytes - Viewed (0) -
docs/tr/docs/tutorial/path-params.md
``` /files/{file_path:path} ``` Bu durumda, parametrenin adı `file_path` olacaktır ve son kısım olan `:path` kısmı, parametrenin herhangi bir *yol* ile eşleşmesi gerektiğini belirtecektir. Böylece şunun gibi bir kullanım yapabilirsiniz: ```Python hl_lines="6" {!../../../docs_src/path_params/tutorial004.py!} ``` !!! tip "İpucu"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 10.8K bytes - Viewed (0) -
docs/ko/docs/tutorial/path-params.md
### 경로 변환기 Starlette의 옵션을 직접 이용하여 다음과 같은 URL을 사용함으로써 *path*를 포함하는 *경로 매개변수*를 선언할 수 있습니다: ``` /files/{file_path:path} ``` 이러한 경우 매개변수의 이름은 `file_path`이며, 마지막 부분 `:path`는 매개변수가 *경로*와 일치해야 함을 명시합니다. 따라서 다음과 같이 사용할 수 있습니다: ```Python hl_lines="6" {!../../../docs_src/path_params/tutorial004.py!} ``` !!! tip "팁"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 9.8K bytes - Viewed (0) -
docs/ru/docs/tutorial/path-params.md
``` /files/{file_path:path} ``` В этом случае `file_path` - это имя параметра, а часть `:path`, указывает, что параметр должен соответствовать любому *пути*. Можете использовать так: ```Python hl_lines="6" {!../../../docs_src/path_params/tutorial004.py!} ``` !!! tip "Подсказка"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 14.1K bytes - Viewed (0) -
docs/fr/docs/tutorial/path-params.md
``` /files/{file_path:path} ``` Dans ce cas, le nom du paramètre est `file_path`, et la dernière partie, `:path`, indique à Starlette que le paramètre devrait correspondre à un *chemin*. Vous pouvez donc l'utilisez comme tel : ```Python hl_lines="6" {!../../../docs_src/path_params/tutorial004.py!} ``` !!! tip "Astuce"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 10K bytes - Viewed (0) -
docs/ru/docs/tutorial/path-params-numeric-validations.md
# Path-параметры и валидация числовых данных Так же, как с помощью `Query` вы можете добавлять валидацию и метаданные для query-параметров, так и с помощью `Path` вы можете добавлять такую же валидацию и метаданные для path-параметров. ## Импорт Path Сначала импортируйте `Path` из `fastapi`, а также импортируйте `Annotated`: === "Python 3.10+" ```Python hl_lines="1 3"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 14.2K bytes - Viewed (0) -
docs/de/docs/tutorial/path-params-numeric-validations.md
So wie Sie mit `Query` für Query-Parameter zusätzliche Validierungen und Metadaten hinzufügen können, können Sie das mittels `Path` auch für Pfad-Parameter tun. ## `Path` importieren Importieren Sie zuerst `Path` von `fastapi`, und importieren Sie `Annotated`. === "Python 3.10+" ```Python hl_lines="1 3" {!> ../../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py!} ``` === "Python 3.9+"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 17:59:29 GMT 2024 - 10.2K bytes - Viewed (0) -
tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py
] } ) def test_post_files_and_token(tmp_path, app: FastAPI): patha = tmp_path / "test.txt" pathb = tmp_path / "testb.txt" patha.write_text("<file content>") pathb.write_text("<file b content>") client = TestClient(app) with patha.open("rb") as filea, pathb.open("rb") as fileb: response = client.post( "/files/",
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 9.8K bytes - Viewed (0)