Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for globals (0.31 sec)

  1. fastapi/dependencies/utils.py

        signature = inspect.signature(call)
        globalns = getattr(call, "__globals__", {})
        typed_params = [
            inspect.Parameter(
                name=param.name,
                kind=param.kind,
                default=param.default,
                annotation=get_typed_annotation(param.annotation, globalns),
            )
            for param in signature.parameters.values()
        ]
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  2. docs/ru/docs/tutorial/dependencies/global-dependencies.md

    Sebastián Ramírez <******@****.***> 1697522351 +0400
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  3. fastapi/openapi/utils.py

            message = (
                f"Duplicate Operation ID {operation_id} for function "
                + f"{route.endpoint.__name__}"
            )
            file_name = getattr(route.endpoint, "__globals__", {}).get("__file__")
            if file_name:
                message += f" at {file_name}"
            warnings.warn(message, stacklevel=1)
        operation_ids.add(operation_id)
        operation["operationId"] = operation_id
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 21.8K bytes
    - Viewed (0)
  4. docs/fr/docs/advanced/additional-responses.md

                * Une clé `schema`, qui a pour valeur le schéma JSON du modèle, voici le bon endroit.
                    * **FastAPI** ajoute ici une référence aux schémas JSON globaux à un autre endroit de votre OpenAPI au lieu de l'inclure directement. De cette façon, d'autres applications et clients peuvent utiliser ces schémas JSON directement, fournir de meilleurs outils de génération de code, etc.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  5. docs/en/docs/contributing.md

        This makes sure that if you use a terminal program installed by that package, you use the one from your local environment and not any other that could be installed globally.
    
    ### Install requirements using pip
    
    After activating the environment as described above:
    
    <div class="termy">
    
    ```console
    $ pip install -r requirements.txt
    
    ---> 100%
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 17:42:43 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/dependencies/global-dependencies.md

    # Global Dependencies
    
    For some types of applications you might want to add dependencies to the whole application.
    
    Similar to the way you can [add `dependencies` to the *path operation decorators*](dependencies-in-path-operation-decorators.md){.internal-link target=_blank}, you can add them to the `FastAPI` application.
    
    In that case, they will be applied to all the *path operations* in the application:
    
    === "Python 3.9+"
    
        ```Python hl_lines="16"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  7. docs/pt/docs/advanced/events.md

    Fazendo isso em funções separadas que não compartilham lógica ou variáveis entre elas é mais difícil já que você precisa armazenar os valores em variáveis globais ou truques parecidos.
    
    Por causa disso, agora é recomendado em vez disso usar o `lifespan` como explicado acima.
    
    ## Detalhes técnicos
    
    Só um detalhe técnico para nerds curiosos. 🤓
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/bigger-applications.md

    ### Import `FastAPI`
    
    You import and create a `FastAPI` class as normally.
    
    And we can even declare [global dependencies](dependencies/global-dependencies.md){.internal-link target=_blank} that will be combined with the dependencies for each `APIRouter`:
    
    ```Python hl_lines="1  3  7" title="app/main.py"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  9. docs/de/docs/advanced/events.md

    Bei getrennten Funktionen, die keine gemeinsame Logik oder Variablen haben, ist dies schwieriger, da Sie Werte in globalen Variablen speichern oder ähnliche Tricks verwenden müssen.
    
    Aus diesem Grund wird jetzt empfohlen, stattdessen `lifespan` wie oben erläutert zu verwenden.
    
    ## Technische Details
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:30:59 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  10. docs/zh/docs/tutorial/bigger-applications.md

    在这里你导入并使用 `FastAPI` 类。
    
    这将是你的应用程序中将所有内容联结在一起的主文件。
    
    并且由于你的大部分逻辑现在都存在于其自己的特定模块中,因此主文件的内容将非常简单。
    
    ### 导入 `FastAPI`
    
    你可以像平常一样导入并创建一个 `FastAPI` 类。
    
    我们甚至可以声明[全局依赖项](dependencies/global-dependencies.md){.internal-link target=_blank},它会和每个 `APIRouter` 的依赖项组合在一起:
    
    ```Python hl_lines="1  3  7" title="app/main.py"
    {!../../../docs_src/bigger_applications/app/main.py!}
    ```
    
    ### 导入 `APIRouter`
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18.5K bytes
    - Viewed (0)
Back to top