- Sort Score
- Result 10 results
- Languages All
Results 391 - 400 of 1,587 for kjson (0.05 sec)
-
docs/fr/docs/advanced/additional-responses.md
**FastAPI** prendra le modèle Pydantic à partir de là, générera le `JSON Schema` et le placera au bon endroit. Le bon endroit est : * Dans la clé `content`, qui a pour valeur un autre objet JSON (`dict`) qui contient : * Une clé avec le type de support, par ex. `application/json`, qui contient comme valeur un autre objet JSON, qui contient : * Une clé `schema`, qui a pour valeur le schéma JSON du modèle, voici le bon endroit.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.6K bytes - Viewed (0) -
cmd/bucket-replication-metrics.go
// XferStats has transfer stats for replication type XferStats struct { Curr float64 `json:"currRate" msg:"cr"` Avg float64 `json:"avgRate" msg:"av"` Peak float64 `json:"peakRate" msg:"p"` N int64 `json:"n" msg:"n"` measure *rateMeasurement `json:"-"` sma *SMA `json:"-"` } // Clone returns a copy of XferStats func (rx *XferStats) Clone() *XferStats {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 15 12:04:40 UTC 2024 - 14.2K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial002_py39.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 9K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial003.py
assert response.status_code == 200, response.text assert response.json() == {"filenames": ["test.txt", "test2.txt"]} def test_get_root(): client = TestClient(app) response = client.get("/") assert response.status_code == 200, response.text assert b"<form" in response.content def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 7.1K bytes - Viewed (0) -
docs/ja/docs/tutorial/encoder.md
そのために`jsonable_encoder`を使用することができます。 Pydanticモデルのようなオブジェクトを受け取り、JSON互換版を返します: ```Python hl_lines="5 22" {!../../docs_src/encoder/tutorial001.py!} ``` この例では、Pydanticモデルを`dict`に、`datetime`を`str`に変換します。 呼び出した結果は、Pythonの標準の<a href="https://docs.python.org/3/library/json.html#json.dumps" class="external-link" target="_blank">`json.dumps()`</a>でエンコードできるものです。 これはJSON形式のデータを含む大きな`str`を(文字列として)返しません。JSONと互換性のある値とサブの値を持つPython標準のデータ構造(例:`dict`)を返します。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.9K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial001_02.py
response = client.post("/files/") assert response.status_code == 200, response.text assert response.json() == {"message": "No file sent"} def test_post_uploadfile_no_body(): response = client.post("/uploadfile/") assert response.status_code == 200, response.text assert response.json() == {"message": "No upload file sent"} def test_post_file(tmp_path): path = tmp_path / "test.txt"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 8.2K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial001_02_an_py310.py
assert response.status_code == 200, response.text assert response.json() == {"filename": "test.txt"} @needs_py310 def test_openapi_schema(client: TestClient): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 8.5K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial001_03_an.py
assert response.json() == {"file_size": 14} def test_post_upload_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("/uploadfile/", files={"file": file}) assert response.status_code == 200, response.text assert response.json() == {"filename": "test.txt"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 6K bytes - Viewed (0) -
tests/test_additional_properties.py
def test_additional_properties_post(): response = client.post("/foo", json={"items": {"foo": 1, "bar": 2}}) assert response.status_code == 200, response.text assert response.json() == {"foo": 1, "bar": 2} def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.6K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial003_03.py
assert response.headers["location"] == "https://www.youtube.com/watch?v=dQw4w9WgXcQ" def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/teleport": { "get": {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.1K bytes - Viewed (0)