- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 218 for form (0.15 sec)
-
tests/test_tutorial/test_body/test_tutorial001.py
from unittest.mock import patch import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient @pytest.fixture def client(): from docs_src.body.tutorial001 import app client = TestClient(app) return client def test_body_float(client: TestClient): response = client.post("/items/", json={"name": "Foo", "price": 50.5}) assert response.status_code == 200
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 14.7K bytes - Viewed (7) -
tests/test_tutorial/test_security/test_tutorial005_an.py
"summary": "Login For Access Token", "operationId": "login_for_access_token_token_post", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/Body_login_for_access_token_token_post"
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 15.4K bytes - Viewed (0) -
docs/zh/docs/index.md
## 示例升级 现在修改 `main.py` 文件来从 `PUT` 请求中接收请求体。 我们借助 Pydantic 来使用标准的 Python 类型声明请求体。 ```Python hl_lines="4 9-12 25-27" from typing import Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: float is_offer: Union[bool, None] = None @app.get("/")
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Mon Apr 29 05:18:04 GMT 2024 - 18.2K bytes - Viewed (0) -
docs/ru/docs/tutorial/request-forms.md
Когда вам нужно получить поля формы вместо JSON, вы можете использовать `Form`. !!! info "Дополнительная информация" Чтобы использовать формы, сначала установите <a href="https://github.com/Kludex/python-multipart" class="external-link" target="_blank">`python-multipart`</a>. Например, выполните команду `pip install python-multipart`. ## Импорт `Form` Импортируйте `Form` из `fastapi`: === "Python 3.9+" ```Python hl_lines="3"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Mar 13 19:02:19 GMT 2024 - 5K bytes - Viewed (0) -
docs/ko/docs/tutorial/request-forms-and-files.md
# 폼 및 파일 요청 `File` 과 `Form` 을 사용하여 파일과 폼을 함께 정의할 수 있습니다. !!! info "정보" 파일과 폼 데이터를 함께, 또는 각각 업로드하기 위해 먼저 <a href="https://github.com/Kludex/python-multipart" class="external-link" target="_blank">`python-multipart`</a>를 설치해야합니다. 예 ) `pip install python-multipart`. ## `File` 및 `Form` 업로드 ```Python hl_lines="1" {!../../../docs_src/request_forms_and_files/tutorial001.py!} ``` ## `File` 및 `Form` 매개변수 정의
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Mar 13 19:02:19 GMT 2024 - 1.5K bytes - Viewed (0) -
docs/de/docs/tutorial/request-forms-and-files.md
Erstellen Sie Datei- und Formularparameter, so wie Sie es auch mit `Body` und `Query` machen würden: === "Python 3.9+" ```Python hl_lines="10-12" {!> ../../../docs_src/request_forms_and_files/tutorial001_an_py39.py!} ``` === "Python 3.8+" ```Python hl_lines="9-11" {!> ../../../docs_src/request_forms_and_files/tutorial001_an.py!} ``` === "Python 3.8+ nicht annotiert"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 18:07:35 GMT 2024 - 2.2K bytes - Viewed (0) -
docs/pt/docs/tutorial/request-forms-and-files.md
Você pode declarar vários parâmetros `File` e `Form` em uma *operação de caminho*, mas não é possível declarar campos `Body` para receber como JSON, pois a requisição terá o corpo codificado usando `multipart/form-data` ao invés de `application/json`. Isso não é uma limitação do **FastAPI** , é parte do protocolo HTTP. ## Recapitulando
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Mar 13 19:02:19 GMT 2024 - 1.4K bytes - Viewed (0) -
docs/de/docs/tutorial/first-steps.md
Diese Schemadefinition enthält Ihre API-Pfade, die möglichen Parameter, welche diese entgegennehmen, usw. #### Daten-„Schema“ Der Begriff „Schema“ kann sich auch auf die Form von Daten beziehen, wie z. B. einen JSON-Inhalt. In diesem Fall sind die JSON-Attribute und deren Datentypen, usw. gemeint. #### OpenAPI und JSON Schema
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Jan 13 12:16:22 GMT 2024 - 10.5K bytes - Viewed (0) -
docs/ru/docs/tutorial/schema-extra-example.md
## Использование `example` и `examples` в OpenAPI При использовании любой из этих функций: * `Path()` * `Query()` * `Header()` * `Cookie()` * `Body()` * `Form()` * `File()` вы также можете добавить аргумент, содержащий `example` или группу `examples` с дополнительной информацией, которая будет добавлена в **OpenAPI**. ### Параметр `Body` с аргументом `example`
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 11.6K bytes - Viewed (0) -
docs/en/docs/tutorial/request-forms.md
`Form` is a class that inherits directly from `Body`. !!! tip To declare form bodies, you need to use `Form` explicitly, because without it the parameters would be interpreted as query parameters or body (JSON) parameters. ## About "Form Fields" The way HTML forms (`<form></form>`) sends the data to the server normally uses a "special" encoding for that data, it's different from JSON.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Mar 13 19:02:19 GMT 2024 - 3.2K bytes - Viewed (0)