Registry / communication / matrix-common

matrix-common

JSON →
library1.3.0pypypiunverified

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.

pip install matrix-common
INSTALL
IMPORT
SIG · MATRIX-COMMON
M
matrix-common
communicationpythonv1.3.0
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.3.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 · 18.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage

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

MXCUri
from matrix_common.url import MXCUri
from matrix_common.url import MXCUri

Basic usage of key utilities

from matrix_common.url import MXCUri from matrix_common.regex import glob_to_regex from matrix_common.versionstring import get_version_string # Parse an MXC URI uri = MXCUri.from_string("mxc://example.com/abc123") print(f"Server: {uri.server}, Media ID: {uri.media_id}") # Convert glob to regex pattern = glob_to_regex("*.txt") print(f"Regex: {pattern}") # Get version string from module version = get_version_string() print(f"Version: {version}")
Debug
Known issues
breakingVersion 1.2.0 moved to src layout. Imports that relied on direct access to submodules may break if not using the new package structure.
fix
Use absolute imports from matrix_common (e.g., from matrix_common.url import MXCUri).
affects: >=1.2.0
deprecatedPython 3.6 support dropped in v1.3.0. Code running on Python 3.6 will fail to install or import.
fix
Upgrade to Python 3.7 or later.
affects: >=1.3.0
gotchaget_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.
fix
If using a custom working directory, pass the cwd argument explicitly.
affects: >=1.2.0
Upgrade
Version history
1.3.0latest on PyPI · released Sep 13, 2022
Audit
Dependencies
attrsrequiredUsed for class definitions (e.g., MXCUri)
Agent activity
21 hits · last 30 days
node
20
OpenAI (training)
1
Resources
matrix-common — pip install matrix-common · libregistry