Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 261 - 270 of 713 for Pydantic (0.05 seconds)

  1. docs/en/docs/how-to/conditional-openapi.md

    If you want to secure your API, there are several better things you can do, for example:
    
    * Make sure you have well defined Pydantic models for your request bodies and responses.
    * Configure any required permissions and roles using dependencies.
    * Never store plaintext passwords, only password hashes.
    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)
  2. tests/test_dependency_after_yield_streaming.py

        assert response.status_code == 500
        assert response.text == "Internal Server Error"
    
    
    def test_broken_session_stream_raise():
        # Can raise ValueError on Pydantic v2 and ExceptionGroup on Pydantic v1
        with pytest.raises((ValueError, Exception)):
            client.get("/broken-session-stream")
    
    
    def test_broken_session_stream_no_raise():
        """
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 3.2K bytes
    - Click Count (0)
  3. docs/ru/docs/tutorial/sql-databases.md

    Класс `Hero` очень похож на модель Pydantic (фактически, под капотом, *это и есть модель Pydantic*).
    
    Есть несколько отличий:
    
    * `table=True` сообщает SQLModel, что это *модель-таблица*, она должна представлять **таблицу** в SQL базе данных, это не просто *модель данных* (как обычный класс Pydantic).
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Thu Dec 11 21:25:03 GMT 2025
    - 23.6K bytes
    - Click Count (0)
  4. docs/ja/docs/deployment/versions.md

    **FastAPI** は、バージョン毎にStarletteのより新しいバージョンを使用します。
    
    よって、最適なStarletteのバージョン選択を**FastAPI** に任せることができます。
    
    ## Pydanticについて
    
    Pydanticは自身のテストだけでなく**FastAPI** のためのテストを含んでいます。なので、Pydanticの新たなバージョン ( `1.0.0` 以降) は全てFastAPIと整合性があります。
    
    Pydanticのバージョンを、動作が保証できる`1.0.0`以降のいずれかのバージョンから`2.0.0` 未満の間に固定できます。
    
    例えば:
    
    ```txt
    pydantic>=1.2.0,<2.0.0
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Nov 09 16:39:20 GMT 2024
    - 4.3K bytes
    - Click Count (0)
  5. tests/test_response_model_default_factory.py

    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, Field
    
    app = FastAPI()
    
    
    class ResponseModel(BaseModel):
        code: int = 200
        message: str = Field(default_factory=lambda: "Successful operation.")
    
    
    @app.get(
        "/response_model_has_default_factory_return_dict",
        response_model=ResponseModel,
    )
    async def response_model_has_default_factory_return_dict():
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Sep 20 18:51:40 GMT 2025
    - 1.2K bytes
    - Click Count (0)
  6. fastapi/routing.py

                Any,
                Doc(
                    """
                    The type to use for the response.
    
                    It could be any valid Pydantic *field* type. So, it doesn't have to
                    be a Pydantic model, it could be other things, like a `list`, `dict`,
                    etc.
    
                    It will be used for:
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 12:54:56 GMT 2025
    - 174.6K bytes
    - Click Count (0)
  7. docs/uk/docs/tutorial/body-multiple-params.md

    {* ../../docs_src/body_multiple_params/tutorial002_py310.py hl[20] *}
    
    У цьому випадку **FastAPI** розпізнає, що є кілька параметрів тіла (два параметри є моделями Pydantic).
    
    Тому він використає назви параметрів як ключі (назви полів) у тілі запиту, очікуючи:
    
    ```JSON
    {
        "item": {
            "name": "Foo",
            "description": "The pretender",
            "price": 42.0,
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Feb 28 14:19:00 GMT 2025
    - 7.4K bytes
    - Click Count (0)
  8. docs/ru/docs/python-types.md

    Обратите внимание, что это означает: «`one_person` — это **экземпляр** класса `Person`».
    
    Это не означает: «`one_person` — это **класс** с именем `Person`».
    
    ## Pydantic-модели { #pydantic-models }
    
    <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">Pydantic</a> — это библиотека Python для валидации данных.
    
    Вы объявляете «форму» данных как классы с атрибутами.
    
    И у каждого атрибута есть тип.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 24.4K bytes
    - Click Count (0)
  9. docs_src/body_updates/tutorial002_py310.py

    from fastapi import FastAPI
    from fastapi.encoders import jsonable_encoder
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str | None = None
        description: str | None = None
        price: float | None = None
        tax: float = 10.5
        tags: list[str] = []
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
        "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 1022 bytes
    - Click Count (0)
  10. docs/de/docs/python-types.md

    Beachten Sie, das bedeutet: „`one_person` ist eine **Instanz** der Klasse `Person`“.
    
    Es bedeutet nicht: „`one_person` ist die **Klasse** genannt `Person`“.
    
    ## Pydantic-Modelle { #pydantic-models }
    
    <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">Pydantic</a> ist eine Python-Bibliothek für die Validierung von Daten.
    
    Sie deklarieren die „Form“ der Daten als Klassen mit Attributen.
    
    Und jedes Attribut hat einen Typ.
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 17.9K bytes
    - Click Count (1)
Back to Top