Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 106 for qsub (0.19 sec)

  1. docs/de/docs/tutorial/dependencies/sub-dependencies.md

    Nils Lindemann <******@****.***> 1711822188 +0100
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 18:09:48 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  2. tests/test_additional_response_extra.py

    from fastapi import APIRouter, FastAPI
    from fastapi.testclient import TestClient
    
    router = APIRouter()
    
    sub_router = APIRouter()
    
    app = FastAPI()
    
    
    @sub_router.get("/")
    def read_item():
        return {"id": "foo"}
    
    
    router.include_router(sub_router, prefix="/items")
    
    app.include_router(router)
    
    client = TestClient(app)
    
    
    def test_path_operation():
        response = client.get("/items/")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  3. fastapi/utils.py

        new_field.validate_always = field.validate_always  # type: ignore[attr-defined]
        if field.sub_fields:  # type: ignore[attr-defined]
            new_field.sub_fields = [  # type: ignore[attr-defined]
                create_cloned_field(sub_field, cloned_types=cloned_types)
                for sub_field in field.sub_fields  # type: ignore[attr-defined]
            ]
        if field.key_field:  # type: ignore[attr-defined]
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/static-files.md

    ## Details
    
    The first `"/static"` refers to the sub-path this "sub-application" will be "mounted" on. So, any path that starts with `"/static"` will be handled by it.
    
    The `directory="static"` refers to the name of the directory that contains your static files.
    
    The `name="static"` gives it a name that can be used internally by **FastAPI**.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 19:56:09 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  5. docs/zh/docs/advanced/wsgi.md

    # 包含 WSGI - Flask,Django,其它
    
    您可以挂载多个 WSGI 应用,正如您在 [Sub Applications - Mounts](sub-applications.md){.internal-link target=_blank}, [Behind a Proxy](behind-a-proxy.md){.internal-link target=_blank} 中所看到的那样。
    
    为此, 您可以使用 `WSGIMiddleware` 来包装你的 WSGI 应用,如:Flask,Django,等等。
    
    ## 使用 `WSGIMiddleware`
    
    您需要导入 `WSGIMiddleware`。
    
    然后使用该中间件包装 WSGI 应用(例如 Flask)。
    
    之后将其挂载到某一个路径下。
    
    ```Python hl_lines="2-3  22"
    {!../../../docs_src/wsgi/tutorial001.py!}
    ```
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  6. docs_src/security/tutorial004.py

            detail="Could not validate credentials",
            headers={"WWW-Authenticate": "Bearer"},
        )
        try:
            payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM])
            username: str = payload.get("sub")
            if username is None:
                raise credentials_exception
            token_data = TokenData(username=username)
        except JWTError:
            raise credentials_exception
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 4K bytes
    - Viewed (0)
  7. docs_src/security/tutorial004_an.py

            detail="Could not validate credentials",
            headers={"WWW-Authenticate": "Bearer"},
        )
        try:
            payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM])
            username: str = payload.get("sub")
            if username is None:
                raise credentials_exception
            token_data = TokenData(username=username)
        except JWTError:
            raise credentials_exception
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/behind-a-proxy.md

    ```Python hl_lines="9"
    {!../../../docs_src/behind_a_proxy/tutorial004.py!}
    ```
    
    and then it won't include it in the OpenAPI schema.
    
    ## Mounting a sub-application
    
    If you need to mount a sub-application (as described in [Sub Applications - Mounts](sub-applications.md){.internal-link target=_blank}) while also using a proxy with `root_path`, you can do it normally, as you would expect.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.6K bytes
    - Viewed (2)
  9. docs/en/docs/tutorial/security/get-current-user.md

    Let's create a dependency `get_current_user`.
    
    Remember that dependencies can have sub-dependencies?
    
    `get_current_user` will have a dependency with the same `oauth2_scheme` we created before.
    
    The same as we were doing before in the *path operation* directly, our new dependency `get_current_user` will receive a `token` as a `str` from the sub-dependency `oauth2_scheme`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="25"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/path-params.md

    ### Create an `Enum` class
    
    Import `Enum` and create a sub-class that inherits from `str` and from `Enum`.
    
    By inheriting from `str` the API docs will be able to know that the values must be of type `string` and will be able to render correctly.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
Back to top