{"id":24523,"library":"resourcebundle","title":"ResourceBundle","description":"ResourceBundle is an i18n module for managing string resources in Python, supporting .properties, JSON, and YAML formats. Current version is 2.2.0, requiring Python >=3.5. It follows Java ResourceBundle patterns with locale fallback.","status":"active","version":"2.2.0","language":"python","source_language":"en","source_url":"https://github.com/felix-zenk/ResourceBundle","tags":["i18n","localization","resource-bundle","properties","json","yaml"],"install":[{"cmd":"pip install resourcebundle","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"wrong":"from resourcebundle import ResourceBundle","symbol":"ResourceBundle","correct":"from ResourceBundle import ResourceBundle"}],"quickstart":{"code":"from resourcebundle import ResourceBundle\nimport os\n# Create a bundle with base name 'messages' in current directory\nbundle = ResourceBundle('messages', base_path='.', locale='en')\nprint(bundle.get('greeting', default='Hello'))\n# Output: Hello (or translated value if 'messages_en.properties' exists)","lang":"python","description":"Create a ResourceBundle with base name 'messages', locale 'en', and get a string 'greeting'."},"warnings":[{"fix":"Check the changelog and update your code to use the new API (e.g., ResourceBundle constructor arguments changed).","message":"v2.0.0 introduced breaking changes to the API and file format support. Code written for v1.x may require migration.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use JSON or YAML format instead of XML.","message":"Built-in XML support is deprecated and may be removed in a future release.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Upgrade to v2.0.1 or later, or ensure the base name exists.","message":"ResourceBundle silently accepts non-existent base names (until v2.0.1). In v2.0.1+, an error is raised if no files found.","severity":"gotcha","affected_versions":"<2.0.1"},{"fix":"Upgrade to v2.0.5+ if you use multi-line property values.","message":"Line continuations in .properties files (using backslash) are only supported from v2.0.5 onward.","severity":"gotcha","affected_versions":"<2.0.5"}],"env_vars":null,"search_vec":"'2.2.0':22 '3.5':25 'bundl':38 'current':19 'fallback':33 'follow':27 'format':18 'i18n':5,34 'java':28 'json':15,40 'local':32,35 'manag':8 'modul':6 'pattern':30 'properti':14,39 'python':12,24 'requir':23 'resourc':10,37 'resource-bundl':36 'resourcebundl':1,2,29 'string':9 'support':13 'version':20 'yaml':17,41","created_at":"2026-05-01T08:13:31.872457+00:00","updated_at":"2026-05-01T08:13:31.872457+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"/tmp/tmpmtaggrou/venv/lib/python3.12/site-packages/ResourceBundle/__init__.py\", line 80, in <module>\n    class ResourceBundle(object):\n  File \"/tmp/tmpmtaggrou/venv/lib/python3.12/site-packages/ResourceBundle/__init__."},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2.2.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/felix-zenk/ResourceBundle","docs":"https://github.com/felix-zenk/ResourceBundle","changelog":null,"pypi":"https://pypi.org/project/resourcebundle/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization","data","web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}