Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for slate (0.24 sec)

  1. docs/en/mkdocs.yml

        scheme: default
        primary: teal
        accent: amber
        toggle:
          icon: material/lightbulb
          name: Switch to dark mode
      - media: '(prefers-color-scheme: dark)'
        scheme: slate
        primary: teal
        accent: amber
        toggle:
          icon: material/lightbulb-outline
          name: Switch to light mode
      features:
      - search.suggest
      - search.highlight
      - content.tabs.link
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  2. docs_src/sql_databases_peewee/sql_app/database.py

    from contextvars import ContextVar
    
    import peewee
    
    DATABASE_NAME = "test.db"
    db_state_default = {"closed": None, "conn": None, "ctx": None, "transactions": None}
    db_state = ContextVar("db_state", default=db_state_default.copy())
    
    
    class PeeweeConnectionState(peewee._ConnectionState):
        def __init__(self, **kwargs):
            super().__setattr__("_state", db_state)
            super().__init__(**kwargs)
    
        def __setattr__(self, name, value):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 662 bytes
    - Viewed (0)
  3. docs/de/docs/reference/fastapi.md

    ```python
    from fastapi import FastAPI
    ```
    
    ::: fastapi.FastAPI
        options:
            members:
                - openapi_version
                - webhooks
                - state
                - dependency_overrides
                - openapi
                - websocket
                - include_router
                - get
                - put
                - post
                - delete
                - options
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Feb 18 12:19:32 GMT 2024
    - 715 bytes
    - Viewed (0)
  4. docs/zh/docs/tutorial/sql-databases.md

        我们将`SessionLocal()`请求的创建和处理放在一个`try`块中。
    
        然后我们在finally块中关闭它。
    
        通过这种方式,我们确保数据库会话在请求后始终关闭,即使在处理请求时出现异常也会关闭。
    
    ### 关于`request.state`
    
    `request.state`是每个`Request`对象的属性。它用于存储附加到请求本身的任意对象,例如本例中的数据库会话。您可以在[Starlette 的关于`Request`state](https://www.starlette.io/requests/#other-state)的文档中了解更多信息。
    
    对于这种情况下,它帮助我们确保在所有请求中使用单个数据库会话,然后关闭(在中间件中)。
    
    ### 使用`yield`依赖项与使用中间件的区别
    
    在此处添加**中间件**与`yield`的依赖项的作用效果类似,但也有一些区别:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 27K bytes
    - Viewed (0)
  5. tests/test_dependency_contextvars.py

    legacy_request_state_context_var: ContextVar[Optional[Dict[str, Any]]] = ContextVar(
        "legacy_request_state_context_var", default=None
    )
    
    app = FastAPI()
    
    
    async def set_up_request_state_dependency():
        request_state = {"user": "deadpond"}
        contextvar_token = legacy_request_state_context_var.set(request_state)
        yield request_state
        legacy_request_state_context_var.reset(contextvar_token)
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Feb 17 12:40:12 GMT 2022
    - 1.5K bytes
    - Viewed (0)
  6. docs/en/docs/reference/websockets.md

                - url
                - base_url
                - headers
                - query_params
                - path_params
                - cookies
                - client
                - state
                - url_for
                - client_state
                - application_state
                - receive
                - send
                - accept
                - receive_text
                - receive_bytes
                - receive_json
                - iter_text
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  7. .github/actions/people/app/main.py

    
    class ReviewNode(BaseModel):
        author: Union[Author, None] = None
        state: str
    
    
    class Reviews(BaseModel):
        nodes: List[ReviewNode]
    
    
    class PullRequestNode(BaseModel):
        number: int
        labels: Labels
        author: Union[Author, None] = None
        title: str
        createdAt: datetime
        state: str
        comments: Comments
        reviews: Reviews
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 17:38:21 GMT 2024
    - 19.2K bytes
    - Viewed (1)
  8. .github/actions/notify-translations/app/main.py

                    already_done_comment = comment
            logging.info(
                f"Already notified comment: {already_notified_comment}, already done comment: {already_done_comment}"
            )
    
            if pr.state == "open" and awaiting_label in label_strs:
                logging.info(
                    f"This PR seems to be a language translation and awaiting reviews: #{pr.number}"
                )
                if already_notified_comment:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Sep 27 23:01:46 GMT 2023
    - 12.4K bytes
    - Viewed (0)
  9. pyproject.toml

        # Including PR: https://github.com/encode/httpx/pull/2309
        "ignore:'cgi' is deprecated:DeprecationWarning",
        # For passlib
        "ignore:'crypt' is deprecated and slated for removal in Python 3.13:DeprecationWarning",
        # see https://trio.readthedocs.io/en/stable/history.html#trio-0-22-0-2022-09-28
        "ignore:You seem to already have a custom.*:RuntimeWarning:trio",
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  10. docs/em/docs/tutorial/sql-databases.md

         & ⤴️ 👥 🔐 ⚫️ `finally` 🍫.
    
        👉 🌌 👥 ⚒ 💭 💽 🎉 🕧 📪 ⏮️ 📨. 🚥 📤 ⚠ ⏪ 🏭 📨.
    
    ### 🔃 `request.state`
    
    `request.state` 🏠 🔠 `Request` 🎚. ⚫️ 📤 🏪 ❌ 🎚 📎 📨 ⚫️, 💖 💽 🎉 👉 💼. 👆 💪 ✍ 🌅 🔃 ⚫️ <a href="https://www.starlette.io/requests/#other-state" class="external-link" target="_blank">💃 🩺 🔃 `Request` 🇵🇸</a>.
    
    👥 👉 💼, ⚫️ ℹ 👥 🚚 👁 💽 🎉 ⚙️ 🔘 🌐 📨, &amp; ⤴️ 🔐 ⏮️ (🛠️).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 25.2K bytes
    - Viewed (1)
Back to top