- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 144 for nBytes (0.14 sec)
-
docs_src/security/tutorial007_an.py
): current_username_bytes = credentials.username.encode("utf8") correct_username_bytes = b"stanleyjobson" is_correct_username = secrets.compare_digest( current_username_bytes, correct_username_bytes ) current_password_bytes = credentials.password.encode("utf8") correct_password_bytes = b"swordfish" is_correct_password = secrets.compare_digest(
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 1.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/em/docs/tutorial/request-files.md
๐ ๐ ๐ "๐จ ๐ฝ". ๐ฅ ๐ ๐ฃ ๐ ๐ *โก ๐ ๏ธ ๐ข* ๐ข `bytes`, **FastAPI** ๐ โ ๐ ๐ & ๐ ๐ ๐จ ๐ `bytes`. โ๏ธ ๐คฏ ๐ ๐ โ ๐ ๐ ๐ ๐ ๐ช ๐พ. ๐ ๐ ๐ท ๐ ๐คช ๐. โ๏ธ ๐ค ๐ ๐ผ โ ๐ ๐ช ๐ฐ โช๏ธโก๏ธ โ๏ธ `UploadFile`. ## ๐ ๐ข โฎ๏ธ `UploadFile` ๐ฌ ๐ ๐ข โฎ๏ธ ๐ `UploadFile`: ```Python hl_lines="12" {!../../../docs_src/request_files/tutorial001.py!} ``` โ๏ธ `UploadFile` โ๏ธ ๐ ๐ ๐คญ `bytes`: * ๐ ๐ซ โ๏ธ โ๏ธ `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/ko/docs/tutorial/request-files.md
!!! tip "ํ" File์ ๋ณธ๋ฌธ์ ์ ์ธํ ๋, ๋งค๊ฐ๋ณ์๊ฐ ์ฟผ๋ฆฌ ๋งค๊ฐ๋ณ์ ๋๋ ๋ณธ๋ฌธ(JSON) ๋งค๊ฐ๋ณ์๋ก ํด์๋๋ ๊ฒ์ ๋ฐฉ์งํ๊ธฐ ์ํด `File` ์ ์ฌ์ฉํด์ผํฉ๋๋ค. ํ์ผ๋ค์ "ํผ ๋ฐ์ดํฐ"์ ํํ๋ก ์ ๋ก๋ ๋ฉ๋๋ค. *๊ฒฝ๋ก ์๋ ํจ์*์ ๋งค๊ฐ๋ณ์๋ฅผ `bytes` ๋ก ์ ์ธํ๋ ๊ฒฝ์ฐ **FastAPI**๋ ํ์ผ์ ์ฝ๊ณ `bytes` ํํ์ ๋ด์ฉ์ ์ ๋ฌํฉ๋๋ค. ์ด๊ฒ์ ์ ์ฒด ๋ด์ฉ์ด ๋ฉ๋ชจ๋ฆฌ์ ์ ์ฅ๋๋ค๋ ๊ฒ์ ์๋ฏธํ๋ค๋ ๊ฑธ ์ผ๋ํ๊ธฐ ๋ฐ๋๋๋ค. ์ด๋ ์์ ํฌ๊ธฐ์ ํ์ผ๋ค์ ์ ํฉํฉ๋๋ค. ์ด๋ค ๊ฒฝ์ฐ์๋ `UploadFile` ์ ์ฌ์ฉํ๋ ๊ฒ์ด ๋ ์ ๋ฆฌํฉ๋๋ค. ## `File` ๋งค๊ฐ๋ณ์์ `UploadFile` `File` ๋งค๊ฐ๋ณ์๋ฅผ `UploadFile` ํ์ ์ผ๋ก ์ ์ํฉ๋๋ค:
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) -
tests/test_tutorial/test_request_files/test_tutorial001_03.py
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" path.write_bytes(b"<file content>")
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/en/docs/deployment/versions.md
## Available versions You can see the available versions (e.g. to check what is the current latest) in the [Release Notes](../release-notes.md){.internal-link target=_blank}. ## About versions Following the Semantic Versioning conventions, any version below `1.0.0` could potentially add breaking changes.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Nov 05 20:50:37 GMT 2020 - 3.3K bytes - Viewed (0) -
docs/fr/docs/deployment/versions.md
## Versions disponibles Vous pouvez consulter les versions disponibles (par exemple, pour vรฉrifier quelle est la derniรจre version en date) dans les [Notes de version](../release-notes.md){.internal-link target=_blank}. ## ร propos des versions Suivant les conventions de versionnage sรฉmantique, toute version infรฉrieure ร `1.0.0` peut potentiellement ajouter
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Mon Oct 31 17:39:54 GMT 2022 - 4K 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/em/docs/advanced/path-operation-advanced-configuration.md
```Python hl_lines="20-37 39-40" {!../../../docs_src/path_operation_advanced_configuration/tutorial006.py!} ``` ๐ ๐ผ, ๐ฅ ๐ซ ๐ฃ ๐ Pydantic ๐ท. ๐, ๐จ ๐ช ๐ซ <abbr title="converted from some plain format, like bytes, into Python objects">๐ป</abbr> ๐ป, โซ๏ธ โ ๐ `bytes`, & ๐ข `magic_data_reader()` ๐ ๐ ๐ป โซ๏ธ ๐. ๐, ๐ฅ ๐ช ๐ฃ ๐ ๐ ๐จ ๐ช. ### ๐ ๐ ๐ ๐ โ๏ธ ๐ ๐ ๐ฑ, ๐ ๐ช โ๏ธ Pydantic ๐ท ๐ฌ ๐ป ๐ ๐ โคด๏ธ ๐ ๐ ๐ ๐ ๐ *โก ๐ ๏ธ*.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 5.7K bytes - Viewed (0)