# python: Python Quickstart URL: https://generaltranslation.com/en-US/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** — same config file used across all GT libraries ## Quick Example ```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!")} ``` 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