- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 81 for fixes (0.17 sec)
-
docs/en/docs/tutorial/static-files.md
# Static Files You can serve static files automatically from a directory using `StaticFiles`. ## Use `StaticFiles` * Import `StaticFiles`. * "Mount" a `StaticFiles()` instance in a specific path. ```Python hl_lines="2 6" {!../../../docs_src/static_files/tutorial001.py!} ``` !!! note "Technical Details" You could also use `from starlette.staticfiles import StaticFiles`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 19:56:09 GMT 2024 - 1.6K bytes - Viewed (0) -
docs/em/docs/tutorial/request-files.md
{!> ../../../docs_src/request_files/tutorial001_02.py!} ``` === "🐍 3️⃣.1️⃣0️⃣ & 🔛" ```Python hl_lines="7 14" {!> ../../../docs_src/request_files/tutorial001_02_py310.py!} ``` ## `UploadFile` ⏮️ 🌖 🗃 👆 💪 ⚙️ `File()` ⏮️ `UploadFile`, 🖼, ⚒ 🌖 🗃: ```Python hl_lines="13" {!../../../docs_src/request_files/tutorial001_03.py!} ``` ## 💗 📁 📂
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/ko/docs/tutorial/request-files.md
## `File` 임포트 `fastapi` 에서 `File` 과 `UploadFile` 을 임포트 합니다: ```Python hl_lines="1" {!../../../docs_src/request_files/tutorial001.py!} ``` ## `File` 매개변수 정의 `Body` 및 `Form` 과 동일한 방식으로 파일의 매개변수를 생성합니다: ```Python hl_lines="7" {!../../../docs_src/request_files/tutorial001.py!} ``` !!! info "정보" `File` 은 `Form` 으로부터 직접 상속된 클래스입니다.
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/ru/docs/tutorial/request-forms-and-files.md
## Импортируйте `File` и `Form` === "Python 3.9+" ```Python hl_lines="3" {!> ../../../docs_src/request_forms_and_files/tutorial001_an_py39.py!} ``` === "Python 3.6+" ```Python hl_lines="1" {!> ../../../docs_src/request_forms_and_files/tutorial001_an.py!} ``` === "Python 3.6+ без Annotated" !!! tip "Подсказка"
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/tutorial/path-params.md
} ``` ## 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) -
tests/test_tutorial/test_request_files/test_tutorial001_03.py
from fastapi.testclient import TestClient from docs_src.request_files.tutorial001_03 import app 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
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/zh/docs/tutorial/path-params.md
直接使用 Starlette 的选项声明包含*路径*的*路径参数*: ``` /files/{file_path:path} ``` 本例中,参数名为 `file_path`,结尾部分的 `:path` 说明该参数应匹配*路径*。 用法如下: ```Python hl_lines="6" {!../../../docs_src/path_params/tutorial004.py!} ``` !!! tip "提示" 注意,包含 `/home/johndoe/myfile.txt` 的路径参数要以斜杠(`/`)开头。 本例中的 URL 是 `/files//home/johndoe/myfile.txt`。注意,`files` 和 `home` 之间要使用**双斜杠**(`//`)。 ## 小结
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Mon Apr 01 05:35:40 GMT 2024 - 7.6K bytes - Viewed (0) -
docs/zh/docs/advanced/advanced-dependencies.md
{!../../../docs_src/dependencies/tutorial011.py!} ``` 这样就可以**参数化**依赖项,它包含 `checker.fixed_content` 的属性 - `"bar"`。 ## 把实例作为依赖项 然后,不要再在 `Depends(checker)` 中使用 `Depends(FixedContentQueryChecker)`, 而是要使用 `checker`,因为依赖项是类实例 - `checker`,不是类。 处理依赖项时,**FastAPI** 以如下方式调用 `checker`: ```Python checker(q="somequery") ``` ……并用*路径操作函数*的参数 `fixed_content_included` 返回依赖项的值: ```Python hl_lines="20"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Jan 28 18:26:57 GMT 2024 - 2K bytes - Viewed (0) -
.github/workflows/test.yml
env: COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }} CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }} - name: Store coverage files uses: actions/upload-artifact@v3 with: name: coverage path: coverage coverage-combine: needs: [test] runs-on: ubuntu-latest steps:
Others - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 4.4K bytes - Viewed (2) -
.gitignore
__pycache__ .pytest_cache htmlcov dist site .coverage coverage.xml .netlify test.db log.txt Pipfile.lock env3.* env docs_build site_build venv docs.zip archive.zip # vim temporary files *~ .*.sw? .cache # macOS
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Aug 19 13:11:35 GMT 2023 - 268 bytes - Viewed (0)