Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for scatter (0.18 sec)

  1. docs/en/docs/tutorial/path-params-numeric-validations.md

    Python will complain if you put a value with a "default" before a value that doesn't have a "default".
    
    But you can re-order them, and have the value without a default (the query parameter `q`) first.
    
    It doesn't matter for **FastAPI**. It will detect the parameters by their names, types and default declarations (`Query`, `Path`, etc), it doesn't care about the order.
    
    So, you can declare your function as:
    
    === "Python 3.8 non-Annotated"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  2. scripts/docs.py

            # When running build_all(), that function already removes site_path.
            # All this is only relevant locally, on GitHub Actions all this is done through
            # artifacts and multiple workflows, so it doesn't matter if directories are
            # removed or not.
        else:
            dist_path = site_path / lang
            shutil.rmtree(dist_path, ignore_errors=True)
        current_dir = os.getcwd()
        os.chdir(lang_path)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jan 22 19:26:14 GMT 2024
    - 10.9K bytes
    - Viewed (1)
  3. docs/en/docs/tutorial/dependencies/dependencies-with-yield.md

    So, you can look for that specific exception inside the dependency with `except SomeException`.
    
    In the same way, you can use `finally` to make sure the exit steps are executed, no matter if there was an exception or not.
    
    ```Python hl_lines="3  5"
    {!../../../docs_src/dependencies/tutorial007.py!}
    ```
    
    ## Sub-dependencies with `yield`
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  4. tests/test_response_change_status_code.py

    from fastapi import Depends, FastAPI, Response
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    async def response_status_setter(response: Response):
        response.status_code = 201
    
    
    async def parent_dep(result=Depends(response_status_setter)):
        return result
    
    
    @app.get("/", dependencies=[Depends(parent_dep)])
    async def get_main():
        return {"msg": "Hello World"}
    
    
    client = TestClient(app)
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Apr 08 04:37:38 GMT 2020
    - 589 bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/security/simple-oauth2.md

    * `https://www.googleapis.com/auth/drive` is used by Google.
    
    !!! info
        In OAuth2 a "scope" is just a string that declares a specific permission required.
    
        It doesn't matter if it has other characters like `:` or if it is a URL.
    
        Those details are implementation specific.
    
        For OAuth2 they are just strings.
    
    ## Code to get the `username` and `password`
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/security/oauth2-scopes.md

    * `https://www.googleapis.com/auth/drive` is used by Google.
    
    !!! info
        In OAuth2 a "scope" is just a string that declares a specific permission required.
    
        It doesn't matter if it has other characters like `:` or if it is a URL.
    
        Those details are implementation specific.
    
        For OAuth2 they are just strings.
    
    ## Global view
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 21:21:35 GMT 2024
    - 20.5K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/dependencies/index.md

    And you can declare dependencies with `async def` inside of normal `def` *path operation functions*, or `def` dependencies inside of `async def` *path operation functions*, etc.
    
    It doesn't matter. **FastAPI** will know what to do.
    
    !!! note
        If you don't know, check the [Async: *"In a hurry?"*](../../async.md#in-a-hurry){.internal-link target=_blank} section about `async` and `await` in the docs.
    
    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 (0)
  8. docs/en/docs/tutorial/bigger-applications.md

    You have *path operations* for:
    
    * `/items/`
    * `/items/{item_id}`
    
    It's all the same structure as with `app/routers/users.py`.
    
    But we want to be smarter and simplify the code a bit.
    
    We know all the *path operations* in this module have the same:
    
    * Path `prefix`: `/items`.
    * `tags`: (just one tag: `items`).
    * Extra `responses`.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/security/first-steps.md

    And if you click it, you have a little authorization form to type a `username` and `password` (and other optional fields):
    
    <img src="/img/tutorial/security/image02.png">
    
    !!! note
        It doesn't matter what you type in the form, it won't work yet. But we'll get there.
    
    This is of course not the frontend for the final users, but it's a great automatic tool to document interactively all your API.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  10. docs/en/docs/deployment/https.md

    * **By default**, that would mean that you can only have **one HTTPS certificate per IP address**.
        * No matter how big your server is or how small each application you have on it might be.
        * There is a **solution** to this, however.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 12K bytes
    - Viewed (0)
Back to top