{"id":24017,"library":"matrix-common","title":"Matrix Common","description":"Common utilities shared by Synapse, Sydent, and Sygnal. Provides helpers for version strings, regex patterns, MXC URIs, and more. Current version 1.3.0 supports Python >=3.7. Released as needed by Matrix.org services.","status":"active","version":"1.3.0","language":"python","source_language":"en","source_url":"https://github.com/matrix-org/matrix-python-common","tags":["matrix","utilities","synapse","sydent","sygnal"],"install":[{"cmd":"pip install matrix-common","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"Used for class definitions (e.g., MXCUri)","package":"attrs","optional":false}],"imports":[{"wrong":"from matrix_common.url import MXCUri","symbol":"MXCUri","correct":"from matrix_common.url import MXCUri"}],"quickstart":{"code":"from matrix_common.url import MXCUri\nfrom matrix_common.regex import glob_to_regex\nfrom matrix_common.versionstring import get_version_string\n\n# Parse an MXC URI\nuri = MXCUri.from_string(\"mxc://example.com/abc123\")\nprint(f\"Server: {uri.server}, Media ID: {uri.media_id}\")\n\n# Convert glob to regex\npattern = glob_to_regex(\"*.txt\")\nprint(f\"Regex: {pattern}\")\n\n# Get version string from module\nversion = get_version_string()\nprint(f\"Version: {version}\")","lang":"python","description":"Basic usage of key utilities"},"warnings":[{"fix":"Use absolute imports from matrix_common (e.g., from matrix_common.url import MXCUri).","message":"Version 1.2.0 moved to src layout. Imports that relied on direct access to submodules may break if not using the new package structure.","severity":"breaking","affected_versions":">=1.2.0"},{"fix":"Upgrade to Python 3.7 or later.","message":"Python 3.6 support dropped in v1.3.0. Code running on Python 3.6 will fail to install or import.","severity":"deprecated","affected_versions":">=1.3.0"},{"fix":"If using a custom working directory, pass the cwd argument explicitly.","message":"get_version_string now optionally accepts a cwd parameter (since v1.2.0). If calling without cwd, ensure the version file is discoverable from the package root.","severity":"gotcha","affected_versions":">=1.2.0"}],"env_vars":null,"search_vec":"'1.3.0':24 '3.7':27 'common':2,3 'current':22 'helper':12 'matrix':1,34 'matrix.org':32 'mxc':18 'need':30 'pattern':17 'provid':11 'python':26 'regex':16 'releas':28 'servic':33 'share':5 'string':15 'support':25 'sydent':8,37 'sygnal':10,38 'synaps':7,36 'uri':19 'util':4,35 'version':14,23","created_at":"2026-05-01T08:10:51.113173+00:00","updated_at":"2026-05-01T08:10:51.113173+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nModuleNotFoundError: No module named 'matrix_common.url'"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.3.0","cli_name":"","cli_version":null,"type":"library","homepage":"https://matrix.org","github":"https://github.com/matrix-org/matrix-python-common","docs":null,"changelog":null,"pypi":"https://pypi.org/project/matrix-common/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["communication","http-networking"],"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}}