FastAPI 0.137.2 Adds `iter_route_contexts()` and Refreshes Translations

FastAPI · 18 Jun 2026 · 2 min read

#fastapi

FastAPI 0.137.2 has been released, bringing a new feature for advanced routing use cases and a wave of translation updates that make the documentation more accessible worldwide.

Key Changes

  • New iter_route_contexts() method: This is the highlight of the release. It provides an __iter__ method for the route contexts, which allows developers to iterate over route contexts in scenarios where they previously had to access router.routes directly. This is particularly useful for projects like Jupyverse that need to inspect or manipulate routes programmatically. The PR #15785 was contributed by @tiangolo.

  • Translation updates: The release includes updates for 12 languages to fix broken Markdown and keep translations in sync with the latest English docs. Notable fixes include:

    • Korean: Fixed broken Markdown in custom response docs (PR #15774 by @kooqooo).
    • Updated translations for French, Traditional Chinese, German, Korean, Ukrainian, Simplified Chinese, Turkish, Portuguese, Spanish, Japanese, and Russian (PRs #15751-#15761 by @tiangolo).
  • Internal improvements:

    • Updated sponsors list to include BairesDev (PR #15787).
    • Refined the sponsors update script for simpler previews (PR #15786).
    • Bumped the py dependency (part of internal tooling).

Why This Matters

For developers building frameworks or tools on top of FastAPI, iter_route_contexts() offers a cleaner, more Pythonic way to work with routes without relying on low-level router.routes access. Meanwhile, the translation updates ensure that the developer experience remains smooth for a global audience, reducing friction caused by outdated or broken documentation.

Source: https://github.com/fastapi/fastapi/releases/tag/0.137.2

Related

auto-curated · source linked above ← all news