- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 169 for Mile (0.18 sec)
-
tests/test_tutorial/test_request_files/test_tutorial001_03.py
client = TestClient(app) def test_post_file(tmp_path): path = tmp_path / "test.txt" path.write_bytes(b"<file content>") client = TestClient(app) with path.open("rb") as file: response = client.post("/files/", files={"file": file}) assert response.status_code == 200, response.text assert response.json() == {"file_size": 14} def test_post_upload_file(tmp_path): path = tmp_path / "test.txt"
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 6K bytes - Viewed (0) -
docs/ko/docs/tutorial/request-files.md
``` ## `File` 매개변수 정의 `Body` 및 `Form` 과 동일한 방식으로 파일의 매개변수를 생성합니다: ```Python hl_lines="7" {!../../../docs_src/request_files/tutorial001.py!} ``` !!! info "정보" `File` 은 `Form` 으로부터 직접 상속된 클래스입니다. 하지만 `fastapi`로부터 `Query`, `Path`, `File` 등을 임포트 할 때, 이것들은 특별한 클래스들을 반환하는 함수라는 것을 기억하기 바랍니다. !!! tip "팁" File의 본문을 선언할 때, 매개변수가 쿼리 매개변수 또는 본문(JSON) 매개변수로 해석되는 것을 방지하기 위해 `File` 을 사용해야합니다.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Mar 13 19:02:19 GMT 2024 - 8.1K bytes - Viewed (0) -
docs/em/docs/tutorial/request-files.md
👆 💪 🔬 📁 📂 👩💻 ⚙️ `File`. !!! info 📨 📂 📁, 🥇 ❎ <a href="https://github.com/Kludex/python-multipart" class="external-link" target="_blank">`python-multipart`</a>. 🤶 Ⓜ. `pip install python-multipart`. 👉 ↩️ 📂 📁 📨 "📨 💽". ## 🗄 `File` 🗄 `File` & `UploadFile` ⚪️➡️ `fastapi`: ```Python hl_lines="1" {!../../../docs_src/request_files/tutorial001.py!} ``` ## 🔬 `File` 🔢
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Mar 13 19:02:19 GMT 2024 - 6.6K bytes - Viewed (0) -
docs/en/docs/tutorial/testing.md
And your **FastAPI** application might also be composed of several files/modules, etc. ### **FastAPI** app file Let's say you have a file structure as described in [Bigger Applications](bigger-applications.md){.internal-link target=_blank}: ``` . ├── app │ ├── __init__.py │ └── main.py ``` In the file `main.py` you have your **FastAPI** app:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 6.2K bytes - Viewed (0) -
docs/en/docs/advanced/testing-database.md
The only changes here are in the new testing file. Your normal dependency `get_db()` would return a database session. In the test, you could use a dependency override to return your *custom* database session instead of the one that would be used normally. In this example we'll create a temporary database only for the tests. ## File structure We create a new file at `sql_app/tests/test_sql_app.py`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 3.5K bytes - Viewed (0) -
docs/ru/docs/tutorial/request-forms-and-files.md
Вы можете определять файлы и поля формы одновременно, используя `File` и `Form`. !!! info "Дополнительная информация" Чтобы получать загруженные файлы и/или данные форм, сначала установите <a href="https://github.com/Kludex/python-multipart" class="external-link" target="_blank">`python-multipart`</a>. Например: `pip install python-multipart`. ## Импортируйте `File` и `Form` === "Python 3.9+" ```Python hl_lines="3"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Mar 13 19:02:19 GMT 2024 - 2.9K bytes - Viewed (0) -
docs/en/docs/contributing.md
That command created a file `docs/ht/mkdocs.yml` with a simple config that inherits everything from the `en` version: ```yaml INHERIT: ../en/mkdocs.yml ``` !!! tip You could also simply create that file with those contents manually. That command also created a dummy file `docs/ht/index.md` for the main page, you can start by translating that one.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 17:42:43 GMT 2024 - 14.1K bytes - Viewed (0) -
docs/en/docs/advanced/behind-a-proxy.md
Then create a file `traefik.toml` with: ```TOML hl_lines="3" [entryPoints] [entryPoints.http] address = ":9999" [providers] [providers.file] filename = "routes.toml" ``` This tells Traefik to listen on port 9999 and to use another file `routes.toml`. !!! tip
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 11.6K bytes - Viewed (2) -
docs/en/docs/tutorial/path-params.md
"message": "Deep Learning FTW!" } ``` ## Path parameters containing paths Let's say you have a *path operation* with a path `/files/{file_path}`. But you need `file_path` itself to contain a *path*, like `home/johndoe/myfile.txt`. So, the URL for that file would be something like: `/files/home/johndoe/myfile.txt`. ### OpenAPI support
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 9.1K bytes - Viewed (0) -
docs/ru/docs/tutorial/path-params.md
```JSON { "model_name": "alexnet", "message": "Deep Learning FTW!" } ``` ## Path-параметры, содержащие пути Предположим, что есть *операция пути* с путем `/files/{file_path}`. Но вам нужно, чтобы `file_path` сам содержал *путь*, например, `home/johndoe/myfile.txt`. Тогда URL для этого файла будет такой: `/files/home/johndoe/myfile.txt`. ### Поддержка OpenAPI
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)