Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 122 for or (0.14 sec)

  1. docs_src/dependencies/tutorial005_an_py310.py

        return q
    
    
    def query_or_cookie_extractor(
        q: Annotated[str, Depends(query_extractor)],
        last_query: Annotated[str | None, Cookie()] = None,
    ):
        if not q:
            return last_query
        return q
    
    
    @app.get("/items/")
    async def read_query(
        query_or_default: Annotated[str, Depends(query_or_cookie_extractor)],
    ):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 510 bytes
    - Viewed (0)
  2. fastapi/_compat.py

        return (
            _annotation_is_complex(annotation)
            or _annotation_is_complex(origin)
            or hasattr(origin, "__pydantic_core_schema__")
            or hasattr(origin, "__get_pydantic_core_schema__")
        )
    
    
    def field_annotation_is_scalar(annotation: Any) -> bool:
        # handle Ellipsis here to make tuple[int, ...] work nicely
        return annotation is Ellipsis or not field_annotation_is_complex(annotation)
    
    
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  3. docs/en/docs/deployment/docker.md

    All the container management systems (like Docker or Kubernetes) have these networking features integrated into them.
    
    ## Containers and Processes
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 34.3K bytes
    - Viewed (0)
  4. fastapi/encoders.py

            for key, value in obj.items():
                if (
                    (
                        not sqlalchemy_safe
                        or (not isinstance(key, str))
                        or (not key.startswith("_sa"))
                    )
                    and (value is not None or not exclude_none)
                    and key in allowed_keys
                ):
                    encoded_key = jsonable_encoder(
                        key,
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  5. fastapi/security/open_id_connect_url.py

                    provided in one of multiple optional ways (for example, with OpenID
                    Connect or in a cookie).
                    """
                ),
            ] = True,
        ):
            self.model = OpenIdConnectModel(
                openIdConnectUrl=openIdConnectUrl, description=description
            )
            self.scheme_name = scheme_name or self.__class__.__name__
            self.auto_error = auto_error
    
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  6. tests/test_path.py

            {
                "detail": [
                    {
                        "type": "greater_than_equal",
                        "loc": ["path", "item_id"],
                        "msg": "Input should be greater than or equal to 3",
                        "input": "2",
                        "ctx": {"ge": 3.0},
                    }
                ]
            }
        ) | IsDict(
            # TODO: remove when deprecating Pydantic v1
            {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 34.4K bytes
    - Viewed (0)
  7. docs/ru/docs/tutorial/path-params-numeric-validations.md

    А также вы можете добавить валидацию числовых данных:
    
    * `gt`: больше (`g`reater `t`han)
    * `ge`: больше или равно (`g`reater than or `e`qual)
    * `lt`: меньше (`l`ess `t`han)
    * `le`: меньше или равно (`l`ess than or `e`qual)
    
    !!! info "Информация"
        `Query`, `Path` и другие классы, которые мы разберём позже, являются наследниками общего класса `Param`.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 14.2K bytes
    - Viewed (0)
  8. fastapi/routing.py

            self.prefix = prefix
            self.tags: List[Union[str, Enum]] = tags or []
            self.dependencies = list(dependencies or [])
            self.deprecated = deprecated
            self.include_in_schema = include_in_schema
            self.responses = responses or {}
            self.callbacks = callbacks or []
            self.dependency_overrides_provider = dependency_overrides_provider
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
  9. docs/en/docs/deployment/server-workers.md

    Here I'll show you how to use <a href="https://gunicorn.org/" class="external-link" target="_blank">**Gunicorn**</a> with **Uvicorn worker processes**.
    
    !!! info
        If you are using containers, for example with Docker or Kubernetes, I'll tell you more about that in the next chapter: [FastAPI in Containers - Docker](docker.md){.internal-link target=_blank}.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/request-forms.md

        ```Python hl_lines="1"
        {!> ../../../docs_src/request_forms/tutorial001.py!}
        ```
    
    ## Define `Form` parameters
    
    Create form parameters the same way you would for `Body` or `Query`:
    
    === "Python 3.9+"
    
        ```Python hl_lines="9"
        {!> ../../../docs_src/request_forms/tutorial001_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="8"
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 3.2K bytes
    - Viewed (0)
Back to top