{"id":24784,"library":"unicode-rbnf","title":"unicode-rbnf","description":"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.","status":"active","version":"2.4.0","language":"python","source_language":"en","source_url":"https://github.com/rhdunn/unicode-rbnf","tags":["unicode","number formatting","CLDR","rule-based","i18n"],"install":[{"cmd":"pip install unicode-rbnf","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"wrong":"from rbnf import RbnfEngine","symbol":"RbnfEngine","correct":"from unicode_rbnf import RbnfEngine"},{"symbol":"FormatOptions","correct":"from unicode_rbnf import FormatOptions"},{"symbol":"FormatPurpose","correct":"from unicode_rbnf import FormatPurpose"}],"quickstart":{"code":"from rbnf import RbnfEngine\n\n# Create engine for English (US) with default rules\nengine = RbnfEngine.for_language('en-US')\n# Format a number using the 'spellout' rule set\nresult = engine.format_number(1234, 'spellout')\nprint(result)  # e.g., 'one thousand two hundred thirty-four'","lang":"python","description":"Basic usage: create engine, format number with a rule set (e.g., 'spellout')."},"warnings":[{"fix":"If None is returned, ensure the language code is correct and that the CLDR data package is installed or loadable.","message":"RbnfEngine.for_language('en-US') may return None if the language data is not installed or incomplete. Always check the result.","severity":"gotcha","affected_versions":"all"},{"fix":"List available rule sets using engine.list_rules() or refer to CLDR documentation.","message":"Rule set names are case-sensitive and language-specific. 'spellout' is common but not all languages have it.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'2.4.0':28 '3.8.0':32 'base':6,22,39 'cldr':11,36 'compat':29 'current':26 'data':12 'format':8,24,35 'i18n':40 'number':7,23,34 'ordin':16 'pattern':25 'plural':14 'python':31 'rbnf':3 'rule':5,15,17,21,38 'rule-bas':4,20,37 'support':13 'unicod':2,10,33 'unicode-rbnf':1 'use':9 'version':27","created_at":"2026-05-01T08:14:53.907102+00:00","updated_at":"2026-05-01T08:14:53.907102+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2.4.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/rhasspy/unicode-rbnf","docs":null,"changelog":null,"pypi":"https://pypi.org/project/unicode-rbnf/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}