Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 78 for mown (0.14 sec)

  1. docs_src/security/tutorial005_py310.py

    
    @app.get("/users/me/", response_model=User)
    async def read_users_me(current_user: User = Depends(get_current_active_user)):
        return current_user
    
    
    @app.get("/users/me/items/")
    async def read_own_items(
        current_user: User = Security(get_current_active_user, scopes=["items"]),
    ):
        return [{"item_id": "Foo", "owner": current_user.username}]
    
    
    @app.get("/status/")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  2. docs_src/security/tutorial005_an_py310.py

    @app.get("/users/me/", response_model=User)
    async def read_users_me(
        current_user: Annotated[User, Depends(get_current_active_user)],
    ):
        return current_user
    
    
    @app.get("/users/me/items/")
    async def read_own_items(
        current_user: Annotated[User, Security(get_current_active_user, scopes=["items"])],
    ):
        return [{"item_id": "Foo", "owner": current_user.username}]
    
    
    @app.get("/status/")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/dependencies/sub-dependencies.md

    ## Second dependency, "dependable" and "dependant"
    
    Then you can create another dependency function (a "dependable") that at the same time declares a dependency of its own (so it is a "dependant" too):
    
    === "Python 3.10+"
    
        ```Python hl_lines="13"
        {!> ../../../docs_src/dependencies/tutorial005_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="13"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  4. docs/en/docs/features.md

    No more typing the wrong key names, coming back and forth between docs, or scrolling up and down to find if you finally used `username` or `user_name`.
    
    ### Short
    
    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)
  5. docs/fr/docs/fastapi-people.md

    {% endfor %}
    
    </div>
    {% endif %}
    
    ## Sponsors
    
    Ce sont les **Sponsors**. 😎
    
    Ils soutiennent mon travail avec **FastAPI** (et d'autres) avec <a href="https://github.com/sponsors/tiangolo" class="external-link" target="_blank">GitHub Sponsors</a>.
    
    {% if sponsors %}
    
    {% if sponsors.gold %}
    
    ### Gold Sponsors
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/openapi-callbacks.md

    The only new thing is the `callbacks=invoices_callback_router.routes` as an argument to the *path operation decorator*. We'll see what that is next.
    
    ## Documenting the callback
    
    The actual callback code will depend heavily on your own API app.
    
    And it will probably vary a lot from one app to the next.
    
    It could be just one or two lines of code, like:
    
    ```Python
    callback_url = "https://example.com/api/v1/invoices/events/"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  7. docs/de/docs/advanced/security/oauth2-scopes.md

    So sieht die Hierarchie der Abhängigkeiten und Scopes aus:
    
    * Die *Pfadoperation* `read_own_items` hat:
        * Erforderliche Scopes `["items"]` mit der Abhängigkeit:
        * `get_current_active_user`:
            * Die Abhängigkeitsfunktion `get_current_active_user` hat:
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:26:08 GMT 2024
    - 22.8K bytes
    - Viewed (0)
  8. docs/en/docs/help-fastapi.md

    * If the PR can be simplified in a way, you can ask for that, but there's no need to be too picky, there might be a lot of subjective points of view (and I will have my own as well 🙈), so it's better if you can focus on the fundamental things.
    
    ### Tests
    
    * Help me check that the PR has **tests**.
    
    * Check that the tests **fail** before the PR. 🚨
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13.7K bytes
    - Viewed (0)
  9. docs/zh/docs/advanced/security/oauth2-scopes.md

    *路径操作*自身也声明了作用域,`"items"`,这也是 `security_scopes.scopes` 列表传递给 `get_current_user` 的。
    
    依赖项与作用域的层级架构如下:
    
    * *路径操作* `read_own_items` 包含:
        * 依赖项所需的作用域 `["items"]`:
        * `get_current_active_user`:
            *  依赖项函数 `get_current_active_user` 包含:
                * 所需的作用域 `"me"` 包含依赖项:
                * `get_current_user`:
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 22:43:35 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  10. fastapi/concurrency.py

        cm: ContextManager[_T],
    ) -> AsyncGenerator[_T, None]:
        # blocking __exit__ from running waiting on a free thread
        # can create race conditions/deadlocks if the context manager itself
        # has its own internal pool (e.g. a database connection pool)
        # to avoid this we let __exit__ run without a capacity limit
        # since we're creating a new limiter for each call, any non-zero limit
        # works (1 is arbitrary)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Dec 25 17:57:35 GMT 2023
    - 1.4K bytes
    - Viewed (0)
Back to top