- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 118 for fixes (0.12 sec)
-
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) -
docs/em/docs/advanced/advanced-dependencies.md
``` & 👈 🌌 👥 💪 "🔗" 👆 🔗, 👈 🔜 ✔️ `"bar"` 🔘 ⚫️, 🔢 `checker.fixed_content`. ## ⚙️ 👐 🔗 ⤴️, 👥 💪 ⚙️ 👉 `checker` `Depends(checker)`, ↩️ `Depends(FixedContentQueryChecker)`, ↩️ 🔗 👐, `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: Sat Apr 01 09:26:04 GMT 2023 - 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) -
docs_src/request_forms_and_files/tutorial001_an_py39.py
from typing import Annotated from fastapi import FastAPI, File, Form, UploadFile app = FastAPI() @app.post("/files/") async def create_file( file: Annotated[bytes, File()], fileb: Annotated[UploadFile, File()], token: Annotated[str, Form()], ): return { "file_size": len(file), "token": token, "fileb_content_type": fileb.content_type,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 386 bytes - Viewed (0) -
docs_src/request_files/tutorial001_02_py310.py
from fastapi import FastAPI, File, UploadFile app = FastAPI() @app.post("/files/") async def create_file(file: bytes | None = File(default=None)): if not file: return {"message": "No file sent"} else: return {"file_size": len(file)} @app.post("/uploadfile/") async def create_upload_file(file: UploadFile | None = None): if not file: return {"message": "No upload file sent"} else:
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 470 bytes - Viewed (0) -
docs/en/docs/tutorial/testing.md
## Separating tests In a real application, you probably would have your tests in a different file. 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
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) -
tests/test_compat.py
assert response2.json() == [1, 2] def test_is_bytes_sequence_annotation_union(): # For coverage # TODO: in theory this would allow declaring types that could be lists of bytes # to be read from files and other types, but I'm not even sure it's a good idea # to support it as a first class "feature" assert is_bytes_sequence_annotation(Union[List[str], List[bytes]]) def test_is_uploadfile_sequence_annotation():
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Sep 28 04:14:40 GMT 2023 - 2.8K bytes - Viewed (0) -
docs/en/docs/deployment/manually.md
<font color="#3465A4">INFO </font> Searching for package file structure from directories with <font color="#3465A4">__init__.py</font> files <font color="#3465A4">INFO </font> Importing from <font color="#75507B">/home/user/code/</font><font color="#AD7FA8">awesomeapp</font> ╭─ <font color="#8AE234"><b>Python module file</b></font> ─╮ │ │
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 9.2K bytes - Viewed (0) -
docs/zh/docs/tutorial/request-files.md
{!> ../../../docs_src/request_files/tutorial001_02_py310.py!} ``` === "Python 3.8+" ```Python hl_lines="9 17" {!> ../../../docs_src/request_files/tutorial001_02.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.9K bytes - Viewed (0)