Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1341 - 1350 of 1,977 for Fastapi (0.06 sec)

  1. fastapi/openapi/utils.py

        get_flat_dependant,
        get_flat_params,
    )
    from fastapi.encoders import jsonable_encoder
    from fastapi.openapi.constants import METHODS_WITH_BODY, REF_PREFIX, REF_TEMPLATE
    from fastapi.openapi.models import OpenAPI
    from fastapi.params import Body, ParamTypes
    from fastapi.responses import Response
    from fastapi.types import ModelNameMap
    from fastapi.utils import (
        deep_dict_update,
        generate_operation_id_for_path,
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 22.6K bytes
    - Viewed (0)
  2. docs/ja/docs/tutorial/body.md

    * パラメータが**単数型** (`int`、`float`、`str`、`bool` など)の場合は**クエリ**パラメータとして解釈されます。
    * パラメータが **Pydantic モデル**型で宣言された場合、リクエスト**ボディ**として解釈されます。
    
    /// note | "備考"
    
    FastAPIは、`= None`があるおかげで、`q`がオプショナルだとわかります。
    
    `Optional[str]` の`Optional` はFastAPIでは使用されていません(FastAPIは`str`の部分のみ使用します)。しかし、`Optional[str]` はエディタがコードのエラーを見つけるのを助けてくれます。
    
    ///
    
    ## Pydanticを使わない方法
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/sql-databases.md

    /// tip
    
    There is an official project generator with **FastAPI** and **PostgreSQL** including a frontend and more tools: <a href="https://github.com/fastapi/full-stack-fastapi-template" class="external-link" target="_blank">https://github.com/fastapi/full-stack-fastapi-template</a>
    
    ///
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 14.7K bytes
    - Viewed (0)
  4. docs_src/security/tutorial003_an_py310.py

    from typing import Annotated
    
    from fastapi import Depends, FastAPI, HTTPException, status
    from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
    from pydantic import BaseModel
    
    fake_users_db = {
        "johndoe": {
            "username": "johndoe",
            "full_name": "John Doe",
            "email": "******@****.***",
            "hashed_password": "fakehashedsecret",
            "disabled": False,
        },
        "alice": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  5. docs/zh-hant/docs/deployment/index.md

    # 部署
    
    部署 **FastAPI** 應用程式相對容易。
    
    ## 部署是什麼意思
    
    **部署**應用程式指的是執行一系列必要的步驟,使其能夠**讓使用者存取和使用**。
    
    對於一個 **Web API**,部署通常涉及將其放置在**遠端伺服器**上,並使用性能優良且穩定的**伺服器程式**,確保使用者能夠高效、無中斷地存取應用程式,且不會遇到問題。
    
    這與**開發**階段形成鮮明對比,在**開發**階段,你會不斷更改程式碼、破壞程式碼、修復程式碼,然後停止和重新啟動伺服器等。
    
    ## 部署策略
    
    根據你的使用場景和使用工具,有多種方法可以實現此目的。
    
    你可以使用一些工具自行**部署伺服器**,你也可以使用能為你完成部分工作的**雲端服務**,或其他可能的選項。
    
    我將向你展示在部署 **FastAPI** 應用程式時你可能應該記住的一些主要概念(儘管其中大部分適用於任何其他類型的 Web 應用程式)。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Oct 24 18:30:54 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_behind_a_proxy/test_tutorial004.py

    from dirty_equals import IsOneOf
    from fastapi.testclient import TestClient
    
    from docs_src.behind_a_proxy.tutorial004 import app
    
    client = TestClient(app)
    
    
    def test_main():
        response = client.get("/app")
        assert response.status_code == 200
        assert response.json() == {"message": "Hello World", "root_path": "/api/v1"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  7. docs/ru/docs/tutorial/encoder.md

    В некоторых случаях может потребоваться преобразование типа данных (например, Pydantic-модели) в тип, совместимый с JSON (например, `dict`, `list` и т.д.).
    
    Например, если необходимо хранить его в базе данных.
    
    Для этого **FastAPI** предоставляет функцию `jsonable_encoder()`.
    
    ## Использование `jsonable_encoder`
    
    Представим, что у вас есть база данных `fake_db`, которая принимает только JSON-совместимые данные.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_handling_errors/test_tutorial005.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.handling_errors.tutorial005 import app
    
    client = TestClient(app)
    
    
    def test_post_validation_error():
        response = client.post("/items/", json={"title": "towel", "size": "XL"})
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_handling_errors/test_tutorial006.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.handling_errors.tutorial006 import app
    
    client = TestClient(app)
    
    
    def test_get_validation_error():
        response = client.get("/items/foo")
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "int_parsing",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 4K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_header_params/test_tutorial003_an_py39.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.header_params.tutorial003_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    @pytest.mark.parametrize(
        "path,headers,expected_status,expected_response",
        [
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 4.3K bytes
    - Viewed (0)
Back to top