Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 758 for annotaties (0.11 sec)

  1. docs/nl/docs/python-types.md

    ///
    
    ## Type Hints met Metadata Annotaties
    
    Python heeft ook een functie waarmee je **extra <abbr title="Data over de data, in dit geval informatie over het type, bijvoorbeeld een beschrijving.">metadata</abbr>** in deze type hints kunt toevoegen met behulp van `Annotated`.
    
    //// tab | Python 3.9+
    
    In Python 3.9 is `Annotated` onderdeel van de standaardpakket, dus je kunt het importeren vanuit `typing`.
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 18.3K bytes
    - Viewed (0)
  2. docs/nl/docs/features.md

    ### Getest
    
    * 100% <abbr title="De hoeveelheid code die automatisch wordt getest">van de code is getest</abbr>.
    * 100% <abbr title="Python type annotaties, hiermee kunnen je editor en externe tools je beter ondersteunen">type geannoteerde</abbr> codebase.
    * Wordt gebruikt in productietoepassingen.
    
    ## Starlette functies
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Tue Sep 03 13:50:38 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/response-model.md

    This simple case is handled automatically by FastAPI because the return type annotation is the class (or a subclass of) `Response`.
    
    And tools will also be happy because both `RedirectResponse` and `JSONResponse` are subclasses of `Response`, so the type annotation is correct.
    
    ### Annotate a Response Subclass
    
    You can also use a subclass of `Response` in the type annotation:
    
    ```Python hl_lines="8-9"
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 18.1K bytes
    - Viewed (0)
  4. fastapi/dependencies/utils.py

                default=param.default,
                annotation=get_typed_annotation(param.annotation, globalns),
            )
            for param in signature.parameters.values()
        ]
        typed_signature = inspect.Signature(typed_params)
        return typed_signature
    
    
    def get_typed_annotation(annotation: Any, globalns: Dict[str, Any]) -> Any:
        if isinstance(annotation, str):
            annotation = ForwardRef(annotation)
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sat Oct 12 09:36:32 UTC 2024
    - 34.4K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/dataclasses.md

    7. Here the `response_model` is using a type annotation of a list of `Author` dataclasses.
    
        Again, you can combine `dataclasses` with standard type annotations.
    
    8. Notice that this *path operation function* uses regular `def` instead of `async def`.
    
        As always, in FastAPI you can combine `def` and `async def` as needed.
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  6. fastapi/params.py

                self.deprecated = deprecated
            else:
                kwargs["deprecated"] = deprecated
            if PYDANTIC_V2:
                kwargs.update(
                    {
                        "annotation": annotation,
                        "alias_priority": alias_priority,
                        "validation_alias": validation_alias,
                        "serialization_alias": serialization_alias,
                        "strict": strict,
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Fri Sep 06 18:06:20 UTC 2024
    - 27.5K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/query-params-str-validations.md

    Make sure you [Upgrade the FastAPI version](../deployment/versions.md#upgrading-the-fastapi-versions){.internal-link target=_blank} to at least 0.95.1 before using `Annotated`.
    
    ///
    
    ## Use `Annotated` in the type for the `q` parameter
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  8. tests/test_ambiguous_params.py

            AssertionError,
            match=(
                "Cannot specify a FastAPI annotation in `Annotated` and `Depends` as a"
                " default value together for 'foo'"
            ),
        ):
    
            @app.get("/")
            async def get3(foo: Annotated[int, Query(min_length=1)] = Depends(dep)):
                pass  # pragma: nocover
    
        client = TestClient(app)
        response = client.get("/multi-query", params={"foo": "5"})
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Tue Dec 12 00:22:47 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  9. docs/ru/docs/tutorial/query-params-str-validations.md

    ```Python
    q: Annotated[str | None] = None
    ```
    
    ////
    
    //// tab | Python 3.8+
    
    ```Python
    q: Annotated[Union[str, None]] = None
    ```
    
    ////
    
    Обе эти версии означают одно и тоже. `q` - это параметр, который может быть `str` или `None`, и по умолчанию он будет принимать `None`.
    
    Давайте повеселимся. 🎉
    
    ## Добавим `Query` в `Annotated` для query-параметра `q`
    
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 37.5K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/cookie-params.md

    ```
    
    ////
    
    //// tab | Python 3.10+ non-Annotated
    
    /// tip
    
    Prefer to use the `Annotated` version if possible.
    
    ///
    
    ```Python hl_lines="1"
    {!> ../../docs_src/cookie_params/tutorial001_py310.py!}
    ```
    
    ////
    
    //// tab | Python 3.8+ non-Annotated
    
    /// tip
    
    Prefer to use the `Annotated` version if possible.
    
    ///
    
    ```Python hl_lines="3"
    Registered: Sun Oct 27 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.3K bytes
    - Viewed (0)
Back to top