# General Translation Changelog: gt-flask 0.1.0 / gt-fastapi 0.1.0: Inline translation for Python web frameworks
URL: https://generaltranslation.com/en-GB/blog/gt-flask_v0_1_0.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: 
Authors: Ernest McCarter
Published: 2026-03-10

## Overview

Initial release of [`gt-flask`](https://pypi.org/project/gt-flask) and [`gt-fastapi`](https://pypi.org/project/gt-fastapi). These bring the same inline translation model used in `gt-next` and `gt-react` to Python web frameworks.

**These packages are experimental and may be subject to breaking changes.**

## Usage

```python
from flask import Flask
from gt_flask import initialize_gt, t

app = Flask(__name__)
initialize_gt(app)

@app.get("/")
def index():
    return {"message": t("Hello, world!")}

@app.get("/greet")
def greet():
    return {"message": t("Hello, {name}!", name=user.name)}
```

The source string is the source of truth. No key files, no `.po` files. [`t()`](/docs/python/reference/functions/t) resolves the current locale via framework middleware, looks up a translation by hash, interpolates variables, and falls back to the source string if no translation exists.

Python-specific metadata kwargs (`_context`, `_id`, `_max_chars`) handle disambiguation and constraints using underscore-prefixed keyword arguments.

## CLI support

The GT CLI now extracts [`t()`](/docs/python/reference/functions/t) calls from Python source files. See the [companion dev log](/devlog/gt-cli_v2_8_0) for details on [`gt upload`](/docs/cli/reference/commands/upload) and [`gt translate`](/docs/cli/reference/commands/translate) for Python projects.

## Links

* [`gt-flask`](https://pypi.org/project/gt-flask) -- Flask integration
* [`gt-fastapi`](https://pypi.org/project/gt-fastapi) -- FastAPI integration
* [`gt-i18n`](https://pypi.org/project/gt-i18n) -- Framework-agnostic core
* [Source](https://github.com/generaltranslation/gt-python)

## Sitemap

See the full [sitemap](https://generaltranslation.com/sitemap.md) for all pages.
