- Sort Score
- Result 10 results
- Languages All
Results 1571 - 1580 of 2,000 for Fastapi (0.05 sec)
-
docs/en/docs/async.md
If you are working with **FastAPI** you don't have to worry about that, because that "first" function will be your *path operation function*, and FastAPI will know how to do the right thing. But if you want to use `async` / `await` without FastAPI, you can do it as well. ### Write your own async code
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Aug 28 23:33:37 UTC 2024 - 23.5K bytes - Viewed (0) -
docs/en/docs/advanced/advanced-dependencies.md
To do that, we declare a method `__call__`: {* ../../docs_src/dependencies/tutorial011_an_py39.py hl[12] *} In this case, this `__call__` is what **FastAPI** will use to check for additional parameters and sub-dependencies, and this is what will be called to pass a value to the parameter in your *path operation function* later. ## Parameterize the instance
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 16:10:15 UTC 2024 - 2.4K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008c_an.py
import pytest from fastapi.exceptions import FastAPIError from fastapi.testclient import TestClient @pytest.fixture(name="client") def get_client(): from docs_src.dependencies.tutorial008c_an import app client = TestClient(app) return client 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.1K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_configurations/test_tutorial006.py
import pytest from fastapi.testclient import TestClient from docs_src.path_operation_configuration.tutorial006 import app client = TestClient(app) @pytest.mark.parametrize( "path,expected_status,expected_response", [ ("/items/", 200, [{"name": "Foo", "price": 42}]), ("/users/", 200, [{"username": "johndoe"}]), ("/elements/", 200, [{"item_id": "Foo"}]), ], )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.3K bytes - Viewed (0) -
.github/actions/notify-translations/app/main.py
github_graphql_url = "https://api.github.com/graphql" questions_translations_category_id = "DIC_kwDOCZduT84CT5P9" all_discussions_query = """ query Q($category_id: ID) { repository(name: "fastapi", owner: "fastapi") { discussions(categoryId: $category_id, first: 100) { nodes { title id number labels(first: 10) { edges { node { id
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Jul 29 23:35:07 UTC 2024 - 12.4K bytes - Viewed (0) -
docs/ko/docs/tutorial/cors.md
따라서 모든 작업을 의도한대로 실행하기 위해, 허용되는 출처를 명시적으로 지정하는 것이 좋습니다. ## `CORSMiddleware` 사용 `CORSMiddleware` 을 사용하여 **FastAPI** 응용 프로그램의 교차 출처 리소스 공유 환경을 설정할 수 있습니다. * `CORSMiddleware` 임포트. * 허용되는 출처(문자열 형식)의 리스트 생성. * FastAPI 응용 프로그램에 "미들웨어(middleware)"로 추가. 백엔드에서 다음의 사항을 허용할지에 대해 설정할 수도 있습니다: * 자격증명 (인증 헤더, 쿠키 등). * 특정한 HTTP 메소드(`POST`, `PUT`) 또는 와일드카드 `"*"` 를 사용한 모든 HTTP 메소드.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.8K bytes - Viewed (0) -
docs/pt/docs/tutorial/body-nested-models.md
# Corpo - Modelos aninhados Com o **FastAPI**, você pode definir, validar, documentar e usar modelos profundamente aninhados de forma arbitrária (graças ao Pydantic). ## Campos do tipo Lista Você pode definir um atributo como um subtipo. Por exemplo, uma `list` do Python: ```Python hl_lines="14" {!../../docs_src/body_nested_models/tutorial001.py!} ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.4K bytes - Viewed (0) -
tests/test_tutorial/test_response_cookies/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.response_cookies.tutorial001 import app client = TestClient(app) def test_path_operation(): response = client.post("/cookie/") assert response.status_code == 200, response.text assert response.json() == {"message": "Come to the dark side, we have cookies"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jul 09 18:06:12 UTC 2020 - 403 bytes - Viewed (0) -
tests/test_tutorial/test_response_cookies/test_tutorial002.py
from fastapi.testclient import TestClient from docs_src.response_cookies.tutorial002 import app client = TestClient(app) def test_path_operation(): response = client.post("/cookie-and-object/") assert response.status_code == 200, response.text assert response.json() == {"message": "Come to the dark side, we have cookies"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jul 09 18:06:12 UTC 2020 - 414 bytes - Viewed (0) -
tests/test_tutorial/test_testing/test_tutorial001.py
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": { "/": { "get": { "responses": { "200": { "description": "Successful Response",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 821 bytes - Viewed (0)