Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 133 for FastApi (0.04 sec)

  1. docs/en/docs/release-notes.md

    * 🔧 Update sponsors: add Greptile. PR [#14429](https://github.com/fastapi/fastapi/pull/14429) by [@tiangolo](https://github.com/tiangolo).
    * 👥 Update FastAPI GitHub topic repositories. PR [#14426](https://github.com/fastapi/fastapi/pull/14426) by [@tiangolo](https://github.com/tiangolo).
    * ⬆ Bump markdown-include-variants from 0.0.6 to 0.0.7. PR [#14423](https://github.com/fastapi/fastapi/pull/14423) by [@YuriiMotov](https://github.com/YuriiMotov).
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:06:15 UTC 2025
    - 586.7K bytes
    - Viewed (0)
  2. fastapi/routing.py

        in another `APIRouter` (ultimately included in the app).
    
        Read more about it in the
        [FastAPI docs for Bigger Applications - Multiple Files](https://fastapi.tiangolo.com/tutorial/bigger-applications/).
    
        ## Example
    
        ```python
        from fastapi import APIRouter, FastAPI
    
        app = FastAPI()
        router = APIRouter()
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 174.6K bytes
    - Viewed (0)
  3. tests/test_regex_deprecated_params.py

    from typing import Annotated
    
    import pytest
    from fastapi import FastAPI, Query
    from fastapi.exceptions import FastAPIDeprecationWarning
    from fastapi.testclient import TestClient
    
    from .utils import needs_py310
    
    
    def get_client():
        app = FastAPI()
        with pytest.warns(FastAPIDeprecationWarning):
    
            @app.get("/items/")
            async def read_items(
                q: Annotated[str | None, Query(regex="^fixedquery$")] = None,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  4. tests/test_additional_properties_bool.py

    from typing import Union
    
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, ConfigDict
    
    
    class FooBaseModel(BaseModel):
        model_config = ConfigDict(extra="forbid")
    
    
    class Foo(FooBaseModel):
        pass
    
    
    app = FastAPI()
    
    
    @app.post("/")
    async def post(
        foo: Union[Foo, None] = None,
    ):
        return foo
    
    
    client = TestClient(app)
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 3.7K bytes
    - Viewed (0)
  5. tests/test_read_with_orm_mode.py

    from typing import Any
    
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, ConfigDict
    
    
    def test_read_with_orm_mode() -> None:
        class PersonBase(BaseModel):
            name: str
            lastname: str
    
        class Person(PersonBase):
            @property
            def full_name(self) -> str:
                return f"{self.name} {self.lastname}"
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 1.2K bytes
    - Viewed (0)
  6. tests/test_pydantic_v1_error.py

        skip_module_if_py_gte_314()
    
    from fastapi import FastAPI
    from fastapi.exceptions import PydanticV1NotSupportedError
    
    with warnings.catch_warnings():
        warnings.simplefilter("ignore", UserWarning)
        from pydantic.v1 import BaseModel
    
    
    def test_raises_pydantic_v1_model_in_endpoint_param() -> None:
        class ParamModelV1(BaseModel):
            name: str
    
        app = FastAPI()
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 2.3K bytes
    - Viewed (0)
  7. fastapi/utils.py

        Optional,
        Union,
    )
    from weakref import WeakKeyDictionary
    
    import fastapi
    from fastapi._compat import (
        BaseConfig,
        ModelField,
        PydanticSchemaGenerationError,
        Undefined,
        UndefinedType,
        Validator,
        annotation_is_pydantic_v1,
    )
    from fastapi.datastructures import DefaultPlaceholder, DefaultType
    from fastapi.exceptions import FastAPIDeprecationWarning, PydanticV1NotSupportedError
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  8. tests/test_datetime_custom_encoder.py

    from datetime import datetime, timezone
    
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    
    def test_pydanticv2():
        from pydantic import field_serializer
    
        class ModelWithDatetimeField(BaseModel):
            dt_field: datetime
    
            @field_serializer("dt_field")
            def serialize_datetime(self, dt_field: datetime):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 817 bytes
    - Viewed (0)
  9. tests/test_compat.py

    from fastapi import FastAPI, UploadFile
    from fastapi._compat import (
        Undefined,
        is_uploadfile_sequence_annotation,
    )
    from fastapi._compat.shared import is_bytes_sequence_annotation
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, ConfigDict
    from pydantic.fields import FieldInfo
    
    from .utils import needs_py310
    
    
    def test_model_field_default_required():
        from fastapi._compat import v2
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  10. tests/test_union_inherited_body.py

    from typing import Optional, Union
    
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: Optional[str] = None
    
    
    class ExtendedItem(Item):
        age: int
    
    
    @app.post("/items/")
    def save_union_different_body(item: Union[ExtendedItem, Item]):
        return {"item": item}
    
    
    client = TestClient(app)
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 4.6K bytes
    - Viewed (0)
Back to top