Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 541 - 550 of 713 for Pydantic (0.06 seconds)

  1. tests/test_request_body_parameters_media_type.py

    from fastapi import Body, FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    media_type = "application/vnd.api+json"
    
    
    # NOTE: These are not valid JSON:API resources
    # but they are fine for testing requestBody with custom media_type
    class Product(BaseModel):
        name: str
        price: float
    
    
    class Shop(BaseModel):
        name: str
    
    
    @app.post("/products")
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 6.3K bytes
    - Click Count (0)
  2. tests/test_get_model_definitions_formfeed_escape.py

    import pytest
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    
    @pytest.fixture(name="client")
    def client_fixture() -> TestClient:
        from pydantic import BaseModel
    
        class Address(BaseModel):
            """
            This is a public description of an Address
            \f
            You can't see this part of the docstring, it's private!
            """
    
            line_1: str
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 12:54:56 GMT 2025
    - 5.8K bytes
    - Click Count (0)
  3. docs/fr/docs/help-fastapi.md

    Comme vous l'avez vu dans la documentation, FastAPI se tient sur les épaules des géants, Starlette et Pydantic.
    
    Vous pouvez également parrainer :
    
    * <a href="https://github.com/sponsors/samuelcolvin" class="external-link" target="_blank">Samuel Colvin (Pydantic)</a>
    * <a href="https://github.com/sponsors/encode" class="external-link" target="_blank">Encode (Starlette, Uvicorn)</a>
    
    ---
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sun Aug 31 10:49:48 GMT 2025
    - 5.7K bytes
    - Click Count (0)
  4. tests/test_webhooks_security.py

    from datetime import datetime
    from typing import Annotated
    
    from fastapi import FastAPI, Security
    from fastapi.security import HTTPBearer
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    bearer_scheme = HTTPBearer()
    
    
    class Subscription(BaseModel):
        username: str
        monthly_fee: float
        start_date: datetime
    
    
    @app.webhooks.post("new-subscription")
    def new_subscription(
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 4.5K bytes
    - Click Count (0)
  5. docs/ru/docs/history-design-future.md

    ## Зависимости { #requirements }
    
    Протестировав несколько вариантов, я решил, что в качестве основы буду использовать <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">**Pydantic**</a> и его преимущества.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Oct 11 17:48:49 GMT 2025
    - 7.4K bytes
    - Click Count (0)
  6. tests/test_invalid_sequence_param.py

    from typing import Optional
    
    import pytest
    from fastapi import FastAPI, Query
    from pydantic import BaseModel
    
    
    def test_invalid_sequence():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            class Item(BaseModel):
                title: str
    
            @app.get("/items/")
            def read_items(q: list[Item] = Query(default=None)):
                pass  # pragma: no cover
    
    
    def test_invalid_tuple():
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 1.2K bytes
    - Click Count (0)
  7. scripts/deploy_docs_status.py

    import logging
    import re
    from typing import Literal
    
    from github import Auth, Github
    from pydantic import BaseModel, SecretStr
    from pydantic_settings import BaseSettings
    
    
    class Settings(BaseSettings):
        github_repository: str
        github_token: SecretStr
        deploy_url: str | None = None
        commit_sha: str
        run_id: int
        state: Literal["pending", "success", "error"] = "pending"
    
    
    class LinkData(BaseModel):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Sep 30 05:56:53 GMT 2025
    - 4.4K bytes
    - Click Count (0)
  8. docs/en/docs/advanced/using-request-directly.md

    Although any other parameter declared normally (for example, the body with a Pydantic model) would still be validated, converted, annotated, etc.
    
    But there are specific cases where it's useful to get the `Request` object.
    
    ## Use the `Request` object directly { #use-the-request-object-directly }
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 2.4K bytes
    - Click Count (0)
  9. docs/zh/docs/index.md

    ## 依赖
    
    Python 及更高版本
    
    FastAPI 站在以下巨人的肩膀之上:
    
    * <a href="https://www.starlette.dev/" class="external-link" target="_blank">Starlette</a> 负责 web 部分。
    * <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">Pydantic</a> 负责数据部分。
    
    ## 安装
    
    <div class="termy">
    
    ```console
    $ pip install fastapi
    
    ---> 100%
    ```
    
    </div>
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Oct 11 17:48:49 GMT 2025
    - 18.2K bytes
    - Click Count (0)
  10. docs/ja/docs/help-fastapi.md

    そこで、感謝の気持ちを伝えるためにコーヒー☕️を買うことができます 😄。
    
    ## FastAPIを強化するツールのスポンサーになる
    
    ドキュメントで見たように、FastAPIはStarletteとPydanticという巨人の肩に乗っています。
    
    以下のスポンサーになることもできます:
    
    * <a href="https://github.com/sponsors/samuelcolvin" class="external-link" target="_blank">Samuel Colvin (Pydantic)</a>
    * <a href="https://github.com/sponsors/encode" class="external-link" target="_blank">Encode (Starlette, Uvicorn)</a>
    
    ---
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sun Aug 31 10:49:48 GMT 2025
    - 5.9K bytes
    - Click Count (0)
Back to Top