- Sort Score
- Result 10 results
- Languages All
Results 1431 - 1440 of 1,929 for FastAPI (0.1 sec)
-
docs/en/docs/advanced/additional-responses.md
/// /// info Unless you specify a different media type explicitly in your `responses` parameter, FastAPI will assume the response has the same media type as the main response class (default `application/json`). But if you have specified a custom response class with `None` as its media type, FastAPI will use `application/json` for any additional response that has an associated model. /// ## Combining information
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 16:07:07 UTC 2024 - 8.7K bytes - Viewed (0) -
docs/em/docs/tutorial/static-files.md
```Python hl_lines="2 6" {!../../docs_src/static_files/tutorial001.py!} ``` /// note | "📡 ℹ" 👆 💪 ⚙️ `from starlette.staticfiles import StaticFiles`. **FastAPI** 🚚 🎏 `starlette.staticfiles` `fastapi.staticfiles` 🏪 👆, 👩💻. ✋️ ⚫️ 🤙 👟 🔗 ⚪️➡️ 💃. /// ### ⚫️❔ "🗜" "🗜" ⛓ ❎ 🏁 "🔬" 🈸 🎯 ➡, 👈 ⤴️ ✊ 💅 🚚 🌐 🎧-➡.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.3K bytes - Viewed (0) -
docs/en/docs/tutorial/request-forms.md
```console $ pip install python-multipart ``` /// ## Import `Form` Import `Form` from `fastapi`: //// tab | Python 3.9+ ```Python hl_lines="3" {!> ../../docs_src/request_forms/tutorial001_an_py39.py!} ``` //// //// tab | Python 3.8+ ```Python hl_lines="1"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.3K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_configurations/test_tutorial005.py
from fastapi.testclient import TestClient from docs_src.path_operation_configuration.tutorial005 import app from ...utils import needs_pydanticv1, needs_pydanticv2 client = TestClient(app) def test_query_params_str_validations(): response = client.post("/items/", json={"name": "Foo", "price": 42}) assert response.status_code == 200, response.text assert response.json() == { "name": "Foo", "price": 42,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Sep 28 04:14:40 UTC 2023 - 8.7K bytes - Viewed (0) -
docs/zh/docs/tutorial/request-forms.md
/// info | "说明" `Form` 是直接继承自 `Body` 的类。 /// /// tip | "提示" 声明表单体要显式使用 `Form` ,否则,FastAPI 会把该参数当作查询参数或请求体(JSON)参数。 /// ## 关于 "表单字段" 与 JSON 不同,HTML 表单(`<form></form>`)向服务器发送数据通常使用「特殊」的编码。 **FastAPI** 要确保从正确的位置读取数据,而不是读取 JSON。 /// note | "技术细节" 表单数据的「媒体类型」编码一般为 `application/x-www-form-urlencoded`。 但包含文件的表单编码为 `multipart/form-data`。文件处理详见下节。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.2K bytes - Viewed (0) -
docs_src/security/tutorial004_an.py
from datetime import datetime, timedelta, timezone from typing import Union import jwt from fastapi import Depends, FastAPI, HTTPException, status from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm from jwt.exceptions import InvalidTokenError from passlib.context import CryptContext from pydantic import BaseModel from typing_extensions import Annotated # to get a string like this run: # openssl rand -hex 32
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon May 20 17:37:28 UTC 2024 - 4.2K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial006.py
from base64 import b64encode from fastapi.testclient import TestClient from docs_src.security.tutorial006 import app client = TestClient(app) def test_security_http_basic(): response = client.get("/users/me", auth=("john", "secret")) assert response.status_code == 200, response.text assert response.json() == {"username": "john", "password": "secret"} def test_security_http_basic_no_credentials():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.3K bytes - Viewed (0) -
docs/vi/docs/python-types.md
/// ## Các gợi ý kiểu dữ liệu trong **FastAPI** **FastAPI** lấy các ưu điểm của các gợi ý kiểu dữ liệu để thực hiện một số thứ. Với **FastAPI**, bạn khai báo các tham số với gợi ý kiểu và bạn có được: * **Sự hỗ trợ từ các trình soạn thảo**. * **Kiểm tra kiểu dữ liệu (type checking)**. ...và **FastAPI** sử dụng các khia báo để:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 21.6K bytes - Viewed (0) -
docs/pt/docs/deployment/concepts.md
### Pequenos erros são tratados automaticamente Ao criar APIs da web com FastAPI, se houver um erro em nosso código, o FastAPI normalmente o conterá na única solicitação que acionou o erro. 🛡
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Oct 04 11:04:50 UTC 2024 - 19.7K bytes - Viewed (0) -
docs/zh/docs/tutorial/encoder.md
# JSON 兼容编码器 在某些情况下,您可能需要将数据类型(如Pydantic模型)转换为与JSON兼容的数据类型(如`dict`、`list`等)。 比如,如果您需要将其存储在数据库中。 对于这种要求, **FastAPI**提供了`jsonable_encoder()`函数。 ## 使用`jsonable_encoder` 让我们假设你有一个数据库名为`fake_db`,它只能接收与JSON兼容的数据。 例如,它不接收`datetime`这类的对象,因为这些对象与JSON不兼容。 因此,`datetime`对象必须将转换为包含<a href="https://en.wikipedia.org/wiki/ISO_8601" class="external-link" target="_blank">ISO格式化</a>的`str`类型对象。 同样,这个数据库也不会接收Pydantic模型(带有属性的对象),而只接收`dict`。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.7K bytes - Viewed (0)