Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 73 for We (0.25 sec)

  1. docs/en/docs/tutorial/sql-databases.md

    Each instance of the `SessionLocal` class will be a database session. The class itself is not a database session yet.
    
    But once we create an instance of the `SessionLocal` class, this instance will be the actual database session.
    
    We name it `SessionLocal` to distinguish it from the `Session` we are importing from SQLAlchemy.
    
    We will use `Session` (the one imported from SQLAlchemy) later.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 29.6K bytes
    - Viewed (0)
  2. docs/en/docs/advanced/settings.md

        If not provided, it's `None` by default, here we provide `"World"` as the default value to use.
    
    Then you could call that Python program:
    
    <div class="termy">
    
    ```console
    // Here we don't set the env var yet
    $ python main.py
    
    // As we didn't set the env var, we get the default value
    
    Hello World from Python
    
    // But if we create an environment variable first
    $ export MY_NAME="Wade Wilson"
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 15.7K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/events.md

    In our code example above, we don't use it directly, but we pass it to FastAPI for it to use it.
    
    The `lifespan` parameter of the `FastAPI` app takes an **async context manager**, so we can pass our new `lifespan` async context manager to it.
    
    ```Python hl_lines="22"
    {!../../../docs_src/events/tutorial003.py!}
    ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/dependencies/classes-as-dependencies.md

        ```Python hl_lines="11"
        {!> ../../../docs_src/dependencies/tutorial001.py!}
        ```
    
    But then we get a `dict` in the parameter `commons` of the *path operation function*.
    
    And we know that editors can't provide a lot of support (like completion) for `dict`s, because they can't know their keys and value types.
    
    We can do better...
    
    ## What makes a dependency
    
    Up to now you have seen dependencies declared as functions.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  5. docs_src/dependencies/tutorial008c_an_py39.py

    app = FastAPI()
    
    
    class InternalError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except InternalError:
            print("Oops, we didn't raise again, Britney 😱")
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
        if item_id == "portal-gun":
            raise InternalError(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 700 bytes
    - Viewed (0)
  6. docs/en/docs/index.md

    <div style="text-align: right; margin-right: 10%;">Kabir Khan - <strong>Microsoft</strong> <a href="https://github.com/tiangolo/fastapi/pull/26" target="_blank"><small>(ref)</small></a></div>
    
    ---
    
    "_We adopted the **FastAPI** library to spawn a **REST** server that can be queried to obtain **predictions**. [for Ludwig]_"
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 19.2K bytes
    - Viewed (0)
  7. fastapi/dependencies/utils.py

                ] = fastapi_specific_annotations[-1]
            else:
                fastapi_annotation = None
            if isinstance(fastapi_annotation, FieldInfo):
                # Copy `field_info` because we mutate `field_info.default` below.
                field_info = copy_field_info(
                    field_info=fastapi_annotation, annotation=use_annotation
                )
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  8. docs/en/docs/how-to/custom-docs-ui-assets.md

    !function(e,t){"object"==typeof exports&&"object"==typeof m
    
    ...
    ```
    
    That confirms that you are being able to serve static files from your app, and that you placed the static files for the docs in the correct place.
    
    Now we can configure the app to use those static files for the docs.
    
    ### Disable the automatic docs for static files
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Oct 30 09:58:58 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  9. docs/he/docs/index.md

    <div style="text-align: right; margin-right: 10%;">Kabir Khan - <strong>Microsoft</strong> <a href="https://github.com/tiangolo/fastapi/pull/26" target="_blank"><small>(ref)</small></a></div>
    
    ---
    
    "_We adopted the **FastAPI** library to spawn a **REST** server that can be queried to obtain **predictions**. [for Ludwig]_"
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 21.2K bytes
    - Viewed (0)
  10. docs/fa/docs/index.md

    ---
    
    <div style="text-align: left; direction: ltr;">"We adopted the <strong>FastAPI</strong> library to spawn a <strong>REST</strong>server that can be queried to obtain <strong>predictions</strong>. [for Ludwig]"</div>
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 23:58:47 GMT 2024
    - 25.9K bytes
    - Viewed (0)
Back to top