Contributing
Development setup
git clone https://github.com/phuvinh010701/mezon-sdk-python.git
cd mezon-sdk-python
uv pip install -e ".[dev]"
Tooling
Project conventions from the repo:
- use
uvinstead ofpip - run lint after Python code changes
- do not edit
pyproject.tomldirectly to add/remove packages; useuvcommands
Common commands
Testing socket / protobuf / login changes
Use pytest as the primary path for focused unit and regression coverage.
Start with a deterministic regression run that does not require network access:
For a broader local sweep of unit/model tests, run:
When you need to verify real login and reconnect behavior, run the integration suite with environment variables configured:
The integration runner requires these environment variables:
MEZON_CLIENT_IDMEZON_API_KEYMEZON_CLAN_IDMEZON_CHANNEL_IDMEZON_USER_IDMEZON_USER_NAMEMEZON_USER_ID_2MEZON_USER_NAME_2
Use the focused regression test for protocol compatibility bugs such as ws_url normalization, URL building, integer cid handling, and safe disconnect cleanup.
Docs structure
The documentation site is driven by:
docs/mkdocs.ymldocs/docs/- top-level
README.md
If you add a new page under docs/docs/, also update docs/mkdocs.yml navigation.
Updating examples
When changing examples, prefer matching the current public SDK surface in:
mezon/client.pymezon/structures/mezon/managers/mezon/models.py
Validation
Before opening a PR for doc changes:
If your change also edits Python files, run the repo lint/test commands as well.