# python: Python Quickstart URL: https://generaltranslation.com/en-GB/docs/python.mdx --- title: Python Quickstart description: Add multiple languages to your Python server in under 10 minutes --- By the end of this guide, your Python server will respond with translated content based on the request's language. General Translation supports both **FastAPI** and **Flask**. Pick the guide that matches your framework: *** ## Overview The Python SDK provides: * **`t()` function** — translate any string inline, with variable interpolation * **`derive()` function** — derive translated values from source content * **Automatic locale detection** — parses `Accept-Language` headers out of the box * **`gt.config.json` support** — the same config file used across all GT libraries ## Quick example First, create a `gt.config.json` in your project root: ```json title="gt.config.json" { "projectId": "your-project-id", "defaultLocale": "en", "locales": ["es", "fr"] } ``` Then set up your app: ```python title="app.py" from fastapi import FastAPI from gt_fastapi import initialize_gt, t app = FastAPI() initialize_gt(app) @app.get("/") def index(): return {"message": t("Hello, world!")} ``` Then translate and publish your content: ```bash pip install gtx-cli gt translate --publish ``` That's it — your endpoint now returns translated content based on the request's locale. ## Next steps * [FastAPI Quickstart](/docs/python/tutorials/fastapi-quickstart) — full setup guide for FastAPI * [Flask Quickstart](/docs/python/tutorials/flask-quickstart) — full setup guide for Flask * [`t()` API Reference](/docs/python/api/t) — variable interpolation and options * [`initialize_gt()` API Reference](/docs/python/api/initialize-gt) — all configuration options