- Sort Score
- Result 10 results
- Languages All
Results 501 - 510 of 1,293 for bytesB (0.08 sec)
-
tests/test_tutorial/test_dependencies/test_tutorial008d_an_py39.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.dependencies.tutorial008d_an_py39 import app client = TestClient(app) return client @needs_py39 def test_get_no_item(client: TestClient): response = client.get("/items/foo") assert response.status_code == 404, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.3K bytes - Viewed (0) -
docs_src/request_files/tutorial001_02.py
from typing import Union from fastapi import FastAPI, File, UploadFile app = FastAPI() @app.post("/files/") async def create_file(file: Union[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: Union[UploadFile, None] = None): if not file:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 508 bytes - Viewed (0) -
cmd/object-api-listobjects_test.go
{testBuckets[1], "unique/folder/1.txt", "content", nil, true}, } for _, object := range testObjects { md5Bytes := md5.Sum([]byte(object.content)) _, err = obj.PutObject(context.Background(), object.parentBucket, object.name, mustGetPutObjReader(t, bytes.NewBufferString(object.content), int64(len(object.content)), hex.EncodeToString(md5Bytes[:]), ""), ObjectOptions{
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 01 11:07:40 UTC 2024 - 73.1K bytes - Viewed (0) -
docs/zh/docs/advanced/security/http-basic-auth.md
`secrets.compare_digest()` 需要仅包含 ASCII 字符(英语字符)的 `bytes` 或 `str`,这意味着它不适用于像`á`一样的字符,如 `Sebastián`。 为了解决这个问题,我们首先将 `username` 和 `password` 转换为使用 UTF-8 编码的 `bytes` 。 然后我们可以使用 `secrets.compare_digest()` 来确保 `credentials.username` 是 `"stanleyjobson"`,且 `credentials.password` 是`"swordfish"`。 //// tab | Python 3.9+
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.2K bytes - Viewed (0) -
fastapi/_compat.py
return is_pv1_scalar_sequence_field(field) def is_bytes_field(field: ModelField) -> bool: return lenient_issubclass(field.type_, bytes) def is_bytes_sequence_field(field: ModelField) -> bool: return field.shape in sequence_shapes and lenient_issubclass(field.type_, bytes) # type: ignore[attr-defined] def copy_field_info(*, field_info: FieldInfo, annotation: Any) -> FieldInfo: return copy(field_info)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 12 09:36:32 UTC 2024 - 23.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ResponseBodyTest.kt
val text = "eile oli oliiviõli" val body = text.toResponseBody() assertThat(body.bytes()).isEqualTo(text.encodeToByteArray()) } @Test fun unicodeBytesWithCharset() { val text = "eile oli oliiviõli".encodeToByteArray() val body = text.toResponseBody("text/plain; charset=EBCDIC".toMediaType()) assertThat(body.bytes()).isEqualTo(text) } } abstract class ForwardingSource(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4K bytes - Viewed (0) -
cmd/xl-storage-free-version.go
if fi.SkipTierFreeVersion() { return xlMetaV2Version{}, false } if status, ok := j.MetaSys[ReservedMetadataPrefixLower+TransitionStatus]; ok && bytes.Equal(status, []byte(lifecycle.TransitionComplete)) { vID, err := uuid.Parse(fi.TierFreeVersionID()) if err != nil { panic(fmt.Errorf("Invalid Tier Object delete marker versionId %s %v", fi.TierFreeVersionID(), err)) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Mar 02 05:11:03 UTC 2024 - 3.4K bytes - Viewed (0) -
cmd/grid.go
}), Local: local, Hosts: hosts, AuthToken: validateStorageRequestToken, AuthFn: newCachedAuthToken(), BlockConnect: globalGridStart, // Record incoming and outgoing bytes. Incoming: globalConnStats.incInternodeInputBytes, Outgoing: globalConnStats.incInternodeOutputBytes, TraceTo: globalTrace, RoutePath: grid.RoutePath, }) if err != nil { return err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 3.7K bytes - Viewed (0) -
docs_src/python_types/tutorial007.py
from typing import Set, Tuple def process_items(items_t: Tuple[int, int, str], items_s: Set[bytes]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Apr 11 17:20:32 UTC 2020 - 131 bytes - Viewed (0) -
tests/test_tutorial/test_events/test_tutorial001.py
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient @pytest.fixture(name="app", scope="module") def get_app(): with pytest.warns(DeprecationWarning): from docs_src.events.tutorial001 import app yield app def test_events(app: FastAPI): with TestClient(app) as client: response = client.get("/items/foo") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 18 12:36:40 UTC 2023 - 3.6K bytes - Viewed (0)