Skip to main content

No project description provided

Project description

FastAPI Localization

Util for localization FastAPI application (powered by Fluent)

Example:

from fastapi import FastAPI
from fastapi_l10n import L10nDepends, setup_localization

setup_localization(
    allowed_locales=["en", "fr", "de"],
    default_locale="en",
    resource_ids={
        "en": ["main.ftl"],
        "fr": ["main.ftl"],
        "de": ["main.ftl"],
    }
)
app = FastAPI()

@app.get("/")
async def root(_: L10nDepends):
    return _("hello-message", args={"username": "John"})

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastapi_l10n-0.1.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastapi_l10n-0.1.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_l10n-0.1.1.tar.gz.

File metadata

  • Download URL: fastapi_l10n-0.1.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/24.1.0

File hashes

Hashes for fastapi_l10n-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9aa4965ab335cd44959193ff4ce5ab0139b27992d1f36d1f54af6e2f0a2e55ff
MD5 9bd455bade86664d842899cdfc12c237
BLAKE2b-256 58dcf2c5926e50b5bdffd11699768ce506bb2958644d784100042bfbc8b2ceee

See more details on using hashes here.

File details

Details for the file fastapi_l10n-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fastapi_l10n-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/24.1.0

File hashes

Hashes for fastapi_l10n-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b70969472f23b31b368192053c3af7684599a8d5299873790bd18ac026d7721b
MD5 eef085d760c2b6e448d08be82af4d0e2
BLAKE2b-256 566a6ac054806cdc4c243bee0741d4139e1a48747c0ae9fe2ba62fb99167962e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page