Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 33 for global (0.15 sec)

  1. 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 May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 18:10:13 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  2. 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)
  3. tests/test_dependency_normal_exceptions.py

    def put_user(user_id: str, name: str = Body(), db: dict = Depends(get_database)):
        db[user_id] = name
        return {"message": "OK"}
    
    
    @pytest.fixture(autouse=True)
    def reset_state_and_db():
        global fake_database
        global state
        fake_database = initial_fake_database.copy()
        state = initial_state.copy()
    
    
    client = TestClient(app)
    
    
    def test_dependency_gets_exception():
        assert state["except"] is False
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  4. 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)
  5. docs/en/docs/advanced/generate-clients.md

    ---> 100%
    ```
    
    </div>
    
    #### Generate Client Code
    
    To generate the client code you can use the command line application `openapi-ts` that would now be installed.
    
    Because it is installed in the local project, you probably wouldn't be able to call that command directly, but you would put it on your `package.json` file.
    
    It could look like this:
    
    ```JSON  hl_lines="7"
    {
      "name": "frontend-app",
      "version": "1.0.0",
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  6. 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)
  7. docs/en/docs/tutorial/first-steps.md

    </div>
    
    In the output, there's a line with something like:
    
    ```hl_lines="4"
    INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
    ```
    
    That line shows the URL where your app is being served, in your local machine.
    
    ### Check it
    
    Open your browser at <a href="http://127.0.0.1:8000" class="external-link" target="_blank">http://127.0.0.1:8000</a>.
    
    You will see the JSON response as:
    
    ```JSON
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 12K bytes
    - Viewed (0)
  8. docs/en/docs/release-notes.md

        * <a href="https://fastapi.tiangolo.com/tutorial/dependencies/global-dependencies/" class="external-link" target="_blank">Tutorial - Dependencies - Global Dependencies</a>.
    
    * 📝 Add FastAPI monitoring blog post to External Links. PR [#2324](https://github.com/tiangolo/fastapi/pull/2324) by [@louisguitton](https://github.com/louisguitton).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:42 GMT 2024
    - 388.1K bytes
    - Viewed (1)
  9. docs/fr/docs/tutorial/body.md

    ## Documentation automatique
    
    Les schémas JSON de vos modèles seront intégrés au schéma OpenAPI global de votre application, et seront donc affichés dans la documentation interactive de l'API :
    
    <img src="/img/tutorial/body/image01.png">
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  10. docs/en/mkdocs.yml

          - tutorial/dependencies/classes-as-dependencies.md
          - tutorial/dependencies/sub-dependencies.md
          - tutorial/dependencies/dependencies-in-path-operation-decorators.md
          - tutorial/dependencies/global-dependencies.md
          - tutorial/dependencies/dependencies-with-yield.md
        - Security:
          - tutorial/security/index.md
          - tutorial/security/first-steps.md
          - tutorial/security/get-current-user.md
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 9.1K bytes
    - Viewed (0)
Back to top