Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 37 for globals (0.24 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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  2. 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 Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 21.8K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/settings.md

    ## Settings in a dependency
    
    In some occasions it might be useful to provide the settings from a dependency, instead of having a global object with `settings` that is used everywhere.
    
    This could be especially useful during testing, as it's very easy to override a dependency with your own custom settings.
    
    ### The config file
    
    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)
  4. docs/en/docs/advanced/additional-responses.md

                * A key `schema`, that has as the value the JSON Schema from the model, here's the correct place.
                    * **FastAPI** adds a reference here to the global JSON Schemas in another place in your OpenAPI instead of including it directly. This way, other applications and clients can use those JSON Schemas directly, provide better code generation tools, etc.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  5. docs/en/docs/advanced/events.md

    Doing that in separated functions that don't share logic or variables together is more difficult as you would need to store values in global variables or similar tricks.
    
    Because of that, it's now recommended to instead use the `lifespan` as explained above.
    
    ## Technical Details
    
    Just a technical detail for the curious nerds. 🤓
    
    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)
  6. docs/de/docs/advanced/additional-responses.md

                * Ein Schlüssel `schema`, der als Wert das JSON-Schema aus dem Modell hat, hier ist die richtige Stelle.
                    * **FastAPI** fügt hier eine Referenz auf die globalen JSON-Schemas an einer anderen Stelle in Ihrer OpenAPI hinzu, anstatt es direkt einzubinden. Auf diese Weise können andere Anwendungen und Clients diese JSON-Schemas direkt verwenden, bessere Tools zur Codegenerierung bereitstellen, usw.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:19:26 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/handling-errors.md

    Let's say you have a custom exception `UnicornException` that you (or a library you use) might `raise`.
    
    And you want to handle this exception globally with FastAPI.
    
    You could add a custom exception handler with `@app.exception_handler()`:
    
    ```Python hl_lines="5-7  13-18  24"
    {!../../../docs_src/handling_errors/tutorial003.py!}
    ```
    
    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)
  8. docs/em/docs/tutorial/dependencies/global-dependencies.md

    LeeeeT <******@****.***> 1680341164 +0300
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 828 bytes
    - Viewed (0)
  9. docs/de/docs/tutorial/dependencies/global-dependencies.md

    # Globale Abhängigkeiten
    
    Bei einigen Anwendungstypen möchten Sie möglicherweise Abhängigkeiten zur gesamten Anwendung hinzufügen.
    
    Ähnlich wie Sie [`dependencies` zu den *Pfadoperation-Dekoratoren* hinzufügen](dependencies-in-path-operation-decorators.md){.internal-link target=_blank} können, können Sie sie auch zur `FastAPI`-Anwendung hinzufügen.
    
    In diesem Fall werden sie auf alle *Pfadoperationen* in der Anwendung angewendet:
    
    === "Python 3.9+"
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 18:10:13 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  10. docs/de/docs/tutorial/bigger-applications.md

    ### `FastAPI` importieren
    
    Sie importieren und erstellen wie gewohnt eine `FastAPI`-Klasse.
    
    Und wir können sogar [globale Abhängigkeiten](dependencies/global-dependencies.md){.internal-link target=_blank} deklarieren, die mit den Abhängigkeiten für jeden `APIRouter` kombiniert werden:
    
    ```Python hl_lines="1  3  7" title="app/main.py"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:27:59 GMT 2024
    - 21.1K bytes
    - Viewed (0)
Back to top