Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 102 for cookie (0.14 sec)

  1. docs/es/docs/tutorial/cookie-params.md

    # Parámetros de Cookie
    
    Puedes definir parámetros de Cookie de la misma manera que defines parámetros de `Query` y `Path`.
    
    ## Importar `Cookie`
    
    Primero importa `Cookie`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="3"
        {!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="3"
        {!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!}
        ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Apr 19 19:30:26 GMT 2024
    - 2.4K bytes
    - Viewed (0)
  2. docs/de/docs/tutorial/cookie-params.md

    # Cookie-Parameter
    
    So wie `Query`- und `Path`-Parameter können Sie auch <abbr title='Cookie – „Keks“: Mechanismus, der kurze Daten in Textform im Browser des Benutzers speichert und abfragt'>Cookie</abbr>-Parameter definieren.
    
    ## `Cookie` importieren
    
    Importieren Sie zuerst `Cookie`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="3"
        {!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:02:19 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  3. docs/zh/docs/tutorial/cookie-params.md

    # Cookie 参数
    
     定义 `Cookie` 参数与定义 `Query` 和 `Path` 参数一样。
    
    ## 导入 `Cookie`
    
    首先,导入 `Cookie`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="3"
        {!> ../../../docs_src/cookie_params/tutorial001_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="3"
        {!> ../../../docs_src/cookie_params/tutorial001_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="3"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 22:43:06 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  4. docs/de/docs/tutorial/dependencies/sub-dependencies.md

        Aber **FastAPI** wird wissen, dass es zuerst `query_extractor` auflösen muss, um dessen Resultat `query_or_cookie_extractor` zu übergeben, wenn dieses aufgerufen wird.
    
    ```mermaid
    graph TB
    
    query_extractor(["query_extractor"])
    query_or_cookie_extractor(["query_or_cookie_extractor"])
    
    read_query["/items/"]
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:09:48 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  5. fastapi/__init__.py

    from .exceptions import HTTPException as HTTPException
    from .exceptions import WebSocketException as WebSocketException
    from .param_functions import Body as Body
    from .param_functions import Cookie as Cookie
    from .param_functions import Depends as Depends
    from .param_functions import File as File
    from .param_functions import Form as Form
    from .param_functions import Header as Header
    from .param_functions import Path as Path
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:50:18 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  6. docs/zh/docs/tutorial/header-params.md

        ```
    
    !!! note "技术细节"
    
        `Header` 是 `Path`、`Query`、`Cookie` 的**兄弟类**,都继承自共用的 `Param` 类。
    
        注意,从 `fastapi` 导入的 `Query`、`Path`、`Header` 等对象,实际上是返回特殊类的函数。
    
    !!! info "说明"
    
        必须使用 `Header` 声明 header 参数,否则该参数会被解释为查询参数。
    
    ## 自动转换
    
    `Header` 比 `Path`、`Query` 和 `Cookie` 提供了更多功能。
    
    大部分标准请求头用**连字符**分隔,即**减号**(`-`)。
    
    但是 `user-agent` 这样的变量在 Python 中是无效的。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 22:42:51 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  7. fastapi/security/oauth2.py

                    It is also useful when you want to have authentication that can be
                    provided in one of multiple optional ways (for example, with OAuth2
                    or in a cookie).
                    """
                ),
            ] = True,
        ):
            self.model = OAuth2Model(
                flows=cast(OAuthFlowsModel, flows), description=description
            )
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  8. fastapi/params.py

    from ._compat import PYDANTIC_V2, PYDANTIC_VERSION, Undefined
    
    _Unset: Any = Undefined
    
    
    class ParamTypes(Enum):
        query = "query"
        header = "header"
        path = "path"
        cookie = "cookie"
    
    
    class Param(FieldInfo):
        in_: ParamTypes
    
        def __init__(
            self,
            default: Any = Undefined,
            *,
            default_factory: Union[Callable[[], Any], None] = _Unset,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 27.5K bytes
    - Viewed (1)
  9. fastapi/security/http.py

                    It is also useful when you want to have authentication that can be
                    provided in one of multiple optional ways (for example, in an HTTP
                    Bearer token or in a cookie).
                    """
                ),
            ] = True,
        ):
            self.model = HTTPBearerModel(bearerFormat=bearerFormat, description=description)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Apr 19 15:29:38 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  10. docs_src/dependencies/tutorial005_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import Cookie, Depends, FastAPI
    
    app = FastAPI()
    
    
    def query_extractor(q: Union[str, None] = None):
        return q
    
    
    def query_or_cookie_extractor(
        q: Annotated[str, Depends(query_extractor)],
        last_query: Annotated[Union[str, None], Cookie()] = None,
    ):
        if not q:
            return last_query
        return q
    
    
    @app.get("/items/")
    async def read_query(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 529 bytes
    - Viewed (0)
Back to top