Skip to main content

fluent-manager

DOI PyPI Downloads PyPI - License PyPI - Version

Translations: 🇺🇦 Українська · 🇵🇱 Polski

Lightweight Project Fluent localisation manager with automatic locale fallback.

Installation

pip install fluent-manager

Features

  • Simple API for retrieving localised strings
  • Automatic fallback chain: preferred locales → default locale → key itself
  • Auto-discovery of available locales and .ftl resource files from the filesystem
  • Supports multiple preferred locales in priority order

Directory structure

locales/
├── en/
│   └── messages.ftl
├── uk/
│   └── messages.ftl
└── pl/
    └── messages.ftl

Usage

from fluent_manager import FluentManager

lang_manager = FluentManager(
    locales=["uk", "pl"],
    locales_path="/path/to/locales",
    default_locale="en",
)

# Returns localised string in the first matching locale
message = lang_manager.get("welcome-message", user_name="Andrii")

Fallback behaviour

Situation Result
Key exists in first preferred locale Renders in first preferred locale
Key missing in first locale, exists in next Renders in next preferred locale
Key exists only in default locale Renders in default locale
Key missing in all locales Returns the key itself

API

FluentManager(locales, locales_path, default_locale=None)

Parameter Type Description
locales list Preferred locales in priority order, e.g. ["uk", "pl"]
locales_path str Path to the directory containing locale subdirectories
default_locale str | None Fallback locale. Defaults to "en"

FluentManager.get(key, **kwargs) -> str

Retrieves a localised string by key with optional variables.

FluentManager.languages -> list

List of all available locales detected from the filesystem.

AI Agent Skill

This repository contains a specialised skill for AI agents (such as Gemini CLI). It helps the agent provide expert assistance in writing Python code and integrating this library into your projects.

To install the skill, run:

npx skills add BogdanovychA/fluent-manager --skill fluent-manager

Links

Metadata

Release files for fluent-manager 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fluent-manager 1.0.2
File Size Uploaded Provenance
fluent_manager-1.0.2.tar.gz 4.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for fluent-manager 1.0.2
File Interpreter ABI Platform
fluent_manager-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 9.2 kB

Release files / fluent_manager-1.0.2.tar.gz

Download URL fluent_manager-1.0.2.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4269804e8321b916510c1b0eaca3433dabaca92ad6f5b4725a933b24019b5607
BLAKE2b-256 checksum
How to use checksums
c6d7e5e3c3a714bfb625945e9cc3f82512d45ece439d19da5a00d6d0ef9ddf77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release files / fluent_manager-1.0.2-py3-none-any.whl

Download URL fluent_manager-1.0.2-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24781ef9c41ce4da917fb4eeb1e1b173b7869bf7bda09d5370cb413a1a462400
BLAKE2b-256 checksum
How to use checksums
fdedf2e24db2c28fbcd358505e8ce7d1e267bde947eb986167c33e59551aeebc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Security for fluent-manager 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page