Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for get_data (0.05 sec)

  1. tests/benchmarks/test_general_performance.py

        name: str
        value: int
        dep: int
    
    
    class LargeIn(BaseModel):
        items: list[dict[str, Any]]
        metadata: dict[str, Any]
    
    
    class LargeOut(BaseModel):
        items: list[dict[str, Any]]
        metadata: dict[str, Any]
    
    
    app = FastAPI()
    
    
    @app.post("/sync/validated", response_model=ItemOut)
    def sync_validated(item: ItemIn, dep: Annotated[int, Depends(dep_b)]):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 20:40:26 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  2. fastapi/_compat/v2.py

            value = getattr(field_info, attr, Undefined)
            if value is not Undefined:
                attributes[attr] = value
        return {
            "annotation": field_info.annotation,
            "metadata": field_info.metadata,
            "attributes": attributes,
        }
    
    
    class BaseConfig:
        pass
    
    
    class ErrorWrapper(Exception):
        pass
    
    
    @dataclass
    class ModelField:
        field_info: FieldInfo
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 19.1K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_metadata/test_tutorial002.py

    from fastapi.testclient import TestClient
    
    from docs_src.metadata.tutorial002_py39 import app
    
    client = TestClient(app)
    
    
    def test_items():
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [{"name": "Foo"}]
    
    
    def test_get_openapi_json_default_url():
        response = client.get("/openapi.json")
        assert response.status_code == 404, response.text
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 1.2K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_metadata/test_tutorial003.py

    from fastapi.testclient import TestClient
    
    from docs_src.metadata.tutorial003_py39 import app
    
    client = TestClient(app)
    
    
    def test_items():
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [{"name": "Foo"}]
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 1.5K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_sql_databases/test_tutorial001.py

    from sqlmodel import SQLModel, create_engine
    from sqlmodel.main import default_registry
    
    from tests.utils import needs_py310
    
    
    def clear_sqlmodel():
        # Clear the tables in the metadata for the default base model
        SQLModel.metadata.clear()
        # Clear the Models associated with the registry, to avoid warnings
        default_registry.dispose()
    
    
    @pytest.fixture(
        name="client",
        params=[
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 14K bytes
    - Viewed (0)
  6. tests/test_params_repr.py

    from typing import Any
    
    from fastapi.params import Body, Cookie, Header, Param, Path, Query
    
    test_data: list[Any] = ["teststr", None, ..., 1, []]
    
    
    def get_user():
        return {}  # pragma: no cover
    
    
    def test_param_repr_str():
        assert repr(Param("teststr")) == "Param(teststr)"
    
    
    def test_param_repr_none():
        assert repr(Param(None)) == "Param(None)"
    
    
    def test_param_repr_ellipsis():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 2.3K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_sql_databases/test_tutorial002.py

    from sqlmodel import SQLModel, create_engine
    from sqlmodel.main import default_registry
    
    from tests.utils import needs_py310
    
    
    def clear_sqlmodel():
        # Clear the tables in the metadata for the default base model
        SQLModel.metadata.clear()
        # Clear the Models associated with the registry, to avoid warnings
        default_registry.dispose()
    
    
    @pytest.fixture(
        name="client",
        params=[
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 17.9K bytes
    - Viewed (0)
  8. fastapi/routing.py

                    """
                ),
            ] = None,
            openapi_extra: Annotated[
                Optional[dict[str, Any]],
                Doc(
                    """
                    Extra metadata to be included in the OpenAPI schema for this *path
                    operation*.
    
                    Read more about it in the
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 174.6K bytes
    - Viewed (0)
  9. docs/de/docs/tutorial/query-params-str-validations.md

    ///
    
    ## Verwenden von `Annotated` im Typ für den `q`-Parameter { #use-annotated-in-the-type-for-the-q-parameter }
    
    Erinnern Sie sich, dass ich Ihnen zuvor in [Python-Typen-Intro](../python-types.md#type-hints-with-metadata-annotations){.internal-link target=_blank} gesagt habe, dass `Annotated` verwendet werden kann, um Metadaten zu Ihren Parametern hinzuzufügen?
    
    Jetzt ist es soweit, dies mit FastAPI zu verwenden. 🚀
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 24 10:28:19 UTC 2025
    - 19.1K bytes
    - Viewed (0)
  10. docs/en/docs/release-notes.md

    * Add support for declaring metadata for tags in OpenAPI. New docs at [Tutorial - Metadata and Docs URLs - Metadata for tags](https://fastapi.tiangolo.com/tutorial/metadata/#metadata-for-tags). PR [#1348](https://github.com/tiangolo/fastapi/pull/1348) by [@thomas-maschler](https://github.com/thomas-maschler).
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:06:15 UTC 2025
    - 586.7K bytes
    - Viewed (0)
Back to top