Search Options

Results per page
Sort
Preferred Languages
Advance

Results 281 - 290 of 849 for Pydantic (0.08 sec)

  1. docs_src/request_form_models/tutorial002.py

    from fastapi import FastAPI, Form
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class FormData(BaseModel):
        username: str
        password: str
        model_config = {"extra": "forbid"}
    
    
    @app.post("/login/")
    async def login(data: FormData = Form()):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 06 17:31:18 UTC 2024
    - 267 bytes
    - Viewed (0)
  2. docs_src/request_form_models/tutorial001_an_py39.py

    from typing import Annotated
    
    from fastapi import FastAPI, Form
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class FormData(BaseModel):
        username: str
        password: str
    
    
    @app.post("/login/")
    async def login(data: Annotated[FormData, Form()]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Sep 05 15:16:50 UTC 2024
    - 268 bytes
    - Viewed (0)
  3. docs_src/body_nested_models/tutorial008.py

    from typing import List
    
    from fastapi import FastAPI
    from pydantic import BaseModel, HttpUrl
    
    app = FastAPI()
    
    
    class Image(BaseModel):
        url: HttpUrl
        name: str
    
    
    @app.post("/images/multiple/")
    async def create_multiple_images(images: List[Image]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 12 19:41:44 UTC 2020
    - 273 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_response_model/test_tutorial003.py

                    "UserOut": {
                        "title": "UserOut",
                        "required": IsOneOf(
                            ["username", "email", "full_name"],
                            # TODO: remove when deprecating Pydantic v1
                            ["username", "email"],
                        ),
                        "type": "object",
                        "properties": {
                            "username": {"title": "Username", "type": "string"},
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Aug 04 20:47:07 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  5. docs_src/cookie_param_models/tutorial001_py310.py

    from fastapi import Cookie, FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Cookies(BaseModel):
        session_id: str
        fatebook_tracker: str | None = None
        googall_tracker: str | None = None
    
    
    @app.get("/items/")
    async def read_items(cookies: Cookies = Cookie()):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 303 bytes
    - Viewed (0)
  6. docs/vi/docs/python-types.md

    ////
    
    /// info
    
    Để học nhiều hơn về <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">Pydantic, tham khảo tài liệu của nó</a>.
    
    ///
    
    **FastAPI** được dựa hoàn toàn trên Pydantic.
    
    Bạn sẽ thấy nhiều ví dụ thực tế hơn trong [Hướng dẫn sử dụng](tutorial/index.md){.internal-link target=_blank}.
    
    /// tip
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  7. docs/de/docs/advanced/openapi-callbacks.md

    ```Python hl_lines="9-13  36-53"
    {!../../docs_src/openapi_callbacks/tutorial001.py!}
    ```
    
    /// tip | "Tipp"
    
    Der Query-Parameter `callback_url` verwendet einen Pydantic-<a href="https://docs.pydantic.dev/latest/api/networks/" class="external-link" target="_blank">Url</a>-Typ.
    
    ///
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  8. docs/de/docs/tutorial/security/get-current-user.md

    ```
    
    ////
    
    Aber das ist immer noch nicht so nützlich.
    
    Lassen wir es uns den aktuellen Benutzer überreichen.
    
    ## Ein Benutzermodell erstellen
    
    Erstellen wir zunächst ein Pydantic-Benutzermodell.
    
    So wie wir Pydantic zum Deklarieren von Bodys verwenden, können wir es auch überall sonst verwenden:
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="5  12-16"
    {!> ../../docs_src/security/tutorial002_an_py310.py!}
    ```
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  9. docs_src/request_form_models/tutorial002_pv1_an.py

    from fastapi import FastAPI, Form
    from pydantic import BaseModel
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    class FormData(BaseModel):
        username: str
        password: str
    
        class Config:
            extra = "forbid"
    
    
    @app.post("/login/")
    async def login(data: Annotated[FormData, Form()]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 06 17:31:18 UTC 2024
    - 322 bytes
    - Viewed (0)
  10. docs/ru/docs/history-design-future.md

    И все это, чтобы все пользователи могли получать наилучший опыт разработки.
    
    ## Зависимости
    
    Протестировав несколько вариантов, я решил, что в качестве основы буду использовать <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">**Pydantic**</a> и его преимущества.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Jul 29 23:35:07 UTC 2024
    - 7.2K bytes
    - Viewed (0)
Back to top