{"id":24340,"library":"pyicumessageformat","title":"pyicumessageformat","description":"An unopinionated parser for ICU MessageFormat strings, currently at version 1.0.0. It parses ICU MessageFormat (used for internationalization) into an AST, allowing manipulation, analysis or transformation. The library is stable but maintenance-only with no active development.","status":"active","version":"1.0.0","language":"python","source_language":"en","source_url":"https://github.com/sirstendec/pyicumessageformat","tags":["icu","messageformat","parser","internationalization","i18n"],"install":[{"cmd":"pip install pyicumessageformat","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"No common wrong import known.","wrong":"","symbol":"parse","correct":"from pyicumessageformat import parse"}],"quickstart":{"code":"from pyicumessageformat import parse\n\nmessage = \"Hello, {name}! You have {count, plural, one {# message} other {# messages}}.\"\ntree = parse(message)\nprint(tree)\n# Output: MessageFormatNode(...)","lang":"python","description":"Parse an ICU MessageFormat string into an AST."},"warnings":[{"fix":"Combine with a formatter, e.g., using pyicu (PyICU) or icu4c.","message":"The library only parses; it does NOT format or resolve messages. Use a library like icu (PyICU) or babel to actually substitute variables.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Wrap parse() in try/except and handle parse errors gracefully.","message":"Parsing incomplete or malformed ICU patterns may raise exceptions; validation is minimal.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install pyicumessageformat' in the correct Python environment.","cause":"Package not installed or installed in a different environment.","error":"ModuleNotFoundError: No module named 'pyicumessageformat'"},{"fix":"Use 'from pyicumessageformat import parse' exactly.","cause":"Import error due to wrong casing or typo.","error":"AttributeError: module 'pyicumessageformat' has no attribute 'parse'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}