Registry / serialization / unicode-rbnf

unicode-rbnf

JSON →
library2.4.0pypypi✓ verified 81d ago

Rule-based number formatting using Unicode CLDR data. Supports plural rules, ordinal rules, and other rule-based number formatting patterns. Current version 2.4.0, compatible with Python >=3.8.0.

pip install unicode-rbnf
INSTALL
IMPORT
SIG · UNICODE-RBNF
U
unicode-rbnf
serializationpythonv2.4.0
Install
1.6s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.4.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RbnfEngine
from unicode_rbnf import RbnfEngine
from rbnf import RbnfEngine
FormatOptions
from unicode_rbnf import FormatOptions
FormatPurpose
from unicode_rbnf import FormatPurpose

Basic usage: create engine, format number with a rule set (e.g., 'spellout').

from rbnf import RbnfEngine # Create engine for English (US) with default rules engine = RbnfEngine.for_language('en-US') # Format a number using the 'spellout' rule set result = engine.format_number(1234, 'spellout') print(result) # e.g., 'one thousand two hundred thirty-four'
Debug
Known issues
gotchaRbnfEngine.for_language('en-US') may return None if the language data is not installed or incomplete. Always check the result.
fix
If None is returned, ensure the language code is correct and that the CLDR data package is installed or loadable.
affects: all
gotchaRule set names are case-sensitive and language-specific. 'spellout' is common but not all languages have it.
fix
List available rule sets using engine.list_rules() or refer to CLDR documentation.
affects: all
Upgrade
Version history
2.4.0latest on PyPI · released Oct 7, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
OpenAI (training)
1
Resources
unicode-rbnf — pip install unicode-rbnf · libregistry