Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for _exit (0.13 sec)

  1. docs/em/docs/tutorial/dependencies/dependencies-with-yield.md

        ๐Ÿšฅ ๐Ÿ‘† โ–ถ๏ธ โฎ๏ธ **FastAPI** ๐Ÿ‘† ๐Ÿ’ช ๐Ÿ’š ๐Ÿšถ โšซ๏ธ ๐Ÿ”œ.
    
    ๐Ÿ, ๐Ÿ‘† ๐Ÿ’ช โœ ๐Ÿ”‘ ๐Ÿ‘จโ€๐Ÿ’ผ <a href="https://docs.python.org/3/reference/datamodel.html#context-managers" class="external-link" target="_blank">๐Ÿ— ๐ŸŽ“ โฎ๏ธ 2๏ธโƒฃ ๐Ÿ‘ฉโ€๐Ÿ”ฌ: `__enter__()` &amp; `__exit__()`</a>.
    
    ๐Ÿ‘† ๐Ÿ’ช โš™๏ธ ๐Ÿ‘ซ ๐Ÿ”˜ **FastAPI** ๐Ÿ”— โฎ๏ธ `yield` โš™๏ธ
    `with` โš–๏ธ `async with` ๐Ÿ“„ ๐Ÿ”˜ ๐Ÿ”— ๐Ÿ”ข:
    
    ```Python hl_lines="1-9  13"
    {!../../../docs_src/dependencies/tutorial010.py!}
    ```
    
    !!! tip
    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)
  2. docs/en/docs/tutorial/middleware.md

    * It can do something to that **response** or run any needed code.
    * Then it returns the **response**.
    
    !!! note "Technical Details"
        If you have dependencies with `yield`, the exit code will run *after* the middleware.
    
        If there were any background tasks (documented later), they will run *after* all the middleware.
    
    ## Create a middleware
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/middleware.md

    * Sie kann etwas mit dieser **Response** tun oder beliebigen Code ausfรผhren.
    * Dann gibt sie die **Response** zurรผck.
    
    !!! note "Technische Details"
        Wenn Sie Abhรคngigkeiten mit `yield` haben, wird der Exit-Code *nach* der Middleware ausgefรผhrt.
    
        Wenn es Hintergrundaufgaben gab (spรคter dokumentiert), werden sie *nach* allen Middlewares ausgefรผhrt.
    
    ## Erstellung einer Middleware
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Jan 23 11:26:59 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  4. fastapi/concurrency.py

        except Exception as e:
            ok = bool(
                await anyio.to_thread.run_sync(
                    cm.__exit__, type(e), e, None, limiter=exit_limiter
                )
            )
            if not ok:
                raise e
        else:
            await anyio.to_thread.run_sync(
                cm.__exit__, None, None, None, limiter=exit_limiter
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Dec 25 17:57:35 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  5. docs/ko/docs/tutorial/middleware.md

    * **์š”์ฒญ**์„ ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ์˜ *๊ฒฝ๋กœ ์ž‘๋™*์œผ๋กœ ์ „๋‹ฌํ•˜์—ฌ ์ฒ˜๋ฆฌํ•ฉ๋‹ˆ๋‹ค.
    * ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์˜ *๊ฒฝ๋กœ ์ž‘์—…*์—์„œ ์ƒ์„ฑํ•œ **์‘๋‹ต**๋ฅผ ๋ฐ›์Šต๋‹ˆ๋‹ค.
    * **์‘๋‹ต** ๋˜๋Š” ๋‹ค๋ฅธ ํ•„์š”ํ•œ ์ฝ”๋“œ๋ฅผ ์‹คํ–‰์‹œํ‚ค๋Š” ๋™์ž‘์„ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
    * **์‘๋‹ต**๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.
    
    !!! note "๊ธฐ์ˆ  ์„ธ๋ถ€์‚ฌํ•ญ"
        ๋งŒ์•ฝ `yield`๋ฅผ ์‚ฌ์šฉํ•œ ์˜์กด์„ฑ์„ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค๋ฉด, ๋ฏธ๋“ค์›จ์–ด๊ฐ€ ์‹คํ–‰๋˜๊ณ  ๋‚œ ํ›„์— exit์ด ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค.
    
        ๋งŒ์•ฝ (๋‚˜์ค‘์— ๋ฌธ์„œ์—์„œ ๋‹ค๋ฃฐ) ๋ฐฑ๊ทธ๋ผ์šด๋“œ ์ž‘์—…์ด ์žˆ๋‹ค๋ฉด, ๋ชจ๋“  ๋ฏธ๋“ค์›จ์–ด๊ฐ€ ์‹คํ–‰๋˜๊ณ  *๋‚œ ํ›„์—* ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค.
    
    ## ๋ฏธ๋“ค์›จ์–ด ๋งŒ๋“ค๊ธฐ
    
    ๋ฏธ๋“ค์›จ์–ด๋ฅผ ์ž‘์„ฑํ•˜๊ธฐ ์œ„ํ•ด์„œ ํ•จ์ˆ˜ ์ƒ๋‹จ์— `@app.middleware("http")` ๋ฐ์ฝ”๋ ˆ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
    
    ๋ฏธ๋“ค์›จ์–ด ํ•จ์ˆ˜๋Š” ๋‹ค์Œ ํ•ญ๋ชฉ๋“ค์„ ๋ฐ›์Šต๋‹ˆ๋‹ค:
    
    * `request`.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Jan 31 14:35:27 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  6. docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md

    !!! note "ๆŠ€่ก“่ฉณ็ดฐ"
        ไปฅไธ‹ใจไธ€็ท’ใซไฝฟ็”จใงใใ‚‹้–ขๆ•ฐใชใ‚‰ไฝ•ใงใ‚‚ๆœ‰ๅŠนใงใ™:
    
        * <a href="https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager" class="external-link" target="_blank">`@contextlib.contextmanager`</a>ใพใŸใฏ
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  7. .github/actions/notify-translations/app/main.py

        logging.info(f"PR #{pr.number} has labels: {label_strs}")
        if not langs or lang_all_label not in label_strs:
            logging.info(f"PR #{pr.number} doesn't seem to be a translation PR, skipping")
            sys.exit(0)
    
        # Generate translation map, lang ID to discussion
        discussions = get_graphql_translation_discussions(settings=settings)
        lang_to_discussion_map: Dict[str, AllDiscussionsDiscussionNode] = {}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Sep 27 23:01:46 GMT 2023
    - 12.4K bytes
    - Viewed (0)
  8. .github/actions/people/app/main.py

        if (
            people_old_content == new_people_content
            and github_sponsors_old_content == new_github_sponsors_content
        ):
            logging.info("The FastAPI People data hasn't changed, finishing.")
            sys.exit(0)
        people_path.write_text(new_people_content, encoding="utf-8")
        github_sponsors_path.write_text(new_github_sponsors_content, encoding="utf-8")
        logging.info("Setting up GitHub Actions git user")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 17:38:21 GMT 2024
    - 19.2K bytes
    - Viewed (1)
  9. docs/en/docs/release-notes.md

    This was designed this way mainly to allow using the same objects "yielded" by dependencies inside of background tasks, because the exit code would be executed after the background tasks were finished.
    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)
  10. fastapi/dependencies/utils.py

                background_tasks=background_tasks,
                response=response,
                dependency_overrides_provider=dependency_overrides_provider,
                dependency_cache=dependency_cache,
                async_exit_stack=async_exit_stack,
            )
            (
                sub_values,
                sub_errors,
                background_tasks,
                _,  # the subdependency returns the same response we have
    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)
Back to top