- Sort Score
- Num 10 results
- Language All
Results 621 - 630 of 1,916 for FastApi (0.3 seconds)
-
docs/ru/docs/advanced/testing-dependencies.md
Для таких случаев у вашего приложения **FastAPI** есть атрибут `app.dependency_overrides`, это простой `dict`. Чтобы переопределить зависимость для тестирования, укажите в качестве ключа исходную зависимость (функцию), а в качестве значения — ваше переопределение зависимости (другую функцию). Тогда **FastAPI** будет вызывать это переопределение вместо исходной зависимости.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Sep 30 11:37:11 GMT 2025 - 4.3K bytes - Click Count (0) -
tests/test_tutorial/test_body_nested_models/test_tutorial008.py
{"url": "http://fastapi.tiangolo.com/", "name": "FastAPI"}, ] response = client.post("/images/multiple", json=data) assert response.status_code == 200, response.text assert response.json() == data def test_post_invalid_list_item(client: TestClient): data = [{"url": "not a valid url", "name": "Example"}] response = client.post("/images/multiple", json=data)Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 5.4K bytes - Click Count (0) -
docs/uk/docs/tutorial/security/index.md
Найскладніше — це створити власного провайдера автентифікації/авторизації, як Google чи Facebook. Але **FastAPI** надає Вам інструменти, щоб зробити це легко, беручи на себе важку частину роботи. /// ## Інструменти **FastAPI** FastAPI надає кілька інструментів для кожної з описаних схем безпеки в модулі `fastapi.security`, які спрощують використання цих механізмів захисту.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Jun 24 18:57:48 GMT 2025 - 6.8K bytes - Click Count (0) -
docs/pt/docs/advanced/response-directly.md
# Retornando uma Resposta Diretamente { #return-a-response-directly } Quando você cria uma *operação de rota* no **FastAPI** você pode retornar qualquer dado nela: um dicionário (`dict`), uma lista (`list`), um modelo do Pydantic ou do seu banco de dados, etc. Por padrão, o **FastAPI** irá converter automaticamente o valor do retorno para JSON utilizando o `jsonable_encoder` explicado em [JSON Compatible Encoder](../tutorial/encoder.md){.internal-link target=_blank}.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 3.5K bytes - Click Count (0) -
docs/pt/docs/how-to/extending-openapi.md
### **FastAPI** Normal { #normal-fastapi } Primeiro, escreva toda a sua aplicação **FastAPI** normalmente: {* ../../docs_src/extending_openapi/tutorial001_py39.py hl[1,4,7:9] *} ### Gerar o esquema OpenAPI { #generate-the-openapi-schema }Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 3.6K bytes - Click Count (0) -
tests/test_response_change_status_code.py
from fastapi import Depends, FastAPI, Response from fastapi.testclient import TestClient app = FastAPI() async def response_status_setter(response: Response): response.status_code = 201 async def parent_dep(result=Depends(response_status_setter)): return result @app.get("/", dependencies=[Depends(parent_dep)]) async def get_main(): return {"msg": "Hello World"} client = TestClient(app)
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Apr 08 04:37:38 GMT 2020 - 589 bytes - Click Count (0) -
tests/test_stringified_annotations_simple.py
from __future__ import annotations from typing import Annotated from fastapi import Depends, FastAPI, Request from fastapi.testclient import TestClient from .utils import needs_py310 class Dep: def __call__(self, request: Request): return "test" @needs_py310 def test_stringified_annotations(): app = FastAPI() client = TestClient(app) @app.get("/test/")Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 545 bytes - Click Count (0) -
docs/pt/docs/tutorial/security/index.md
O problema mais complexo é criar um provedor de autenticação/autorização como eles, mas o FastAPI dá a você ferramentas para fazer isso facilmente, enquanto faz o trabalho pesado para você. /// ## **FastAPI** utilitários { #fastapi-utilities } **FastAPI** fornece várias ferramentas para cada um desses esquemas de segurança no módulo `fastapi.security` que simplesmente usa esses mecanismos de segurança.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 10:17:03 GMT 2025 - 4.9K bytes - Click Count (0) -
docs_src/handling_errors/tutorial003_py39.py
from fastapi import FastAPI, Request from fastapi.responses import JSONResponse class UnicornException(Exception): def __init__(self, name: str): self.name = name app = FastAPI() @app.exception_handler(UnicornException) async def unicorn_exception_handler(request: Request, exc: UnicornException): return JSONResponse( status_code=418,
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 626 bytes - Click Count (0) -
docs/ru/docs/advanced/path-operation-advanced-configuration.md
Вы можете ограничить количество строк из docstring *функции-обработчика пути*, используемых для OpenAPI. Добавление `\f` (экранированного символа «form feed») заставит **FastAPI** обрезать текст, используемый для OpenAPI, в этой точке. Эта часть не попадёт в документацию, но другие инструменты (например, Sphinx) смогут использовать остальное.
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 11.5K bytes - Click Count (0)