This repository uses uv for Python interpreter management, dependency locking, command execution, and package building. Install it with:
curl -LsSf https://astral.sh/uv/install.sh | sh
The repository requests CPython 3.11 (the package's minimum supported version) in .python-version. Install it with uv — it is managed by uv and kept separate from your operating-system Python:
uv python install
uv owns the project virtual environment (.venv/); manual activation is optional and not part of the canonical workflow. Install the locked dependencies with:
uv sync --locked
Locked synchronization installs exactly the versions recorded in uv.lock. If project metadata and the lockfile disagree, it fails instead of silently resolving new versions.
uv run --locked python -m unittest discover . --pattern '*test.py'
uv run --locked coverage run -m unittest discover . --pattern '*test.py'
uv run --locked coverage report
uv run --locked pdoc --output ./docs ./ringcentral
Build the source distribution and wheel the way publish-style builds do, with uv-specific source overrides disabled:
uv build --no-sources
To recreate the environment from scratch:
rm -rf .venv
uv sync --locked
Dependency updates are intentional, reviewable changes — ordinary setup and commands never modify the lockfile.
-
After a declared constraint in
pyproject.tomlor a legacy requirements file changes, refresh the lockfile:uv lock -
To upgrade all eligible packages to their latest allowed versions:
uv lock --upgrade -
To upgrade one named package:
uv lock --upgrade-package <package>
Then synchronize and commit the updated uv.lock:
uv sync --locked
Unit tests, including the WebSocket subscription tests, use mocks. They are deterministic and require no RingCentral credentials.
Copy .env.sample to .env.
Edit .env to specify credentials. Live demos read credentials from this local environment file created from the existing sample.
Run a demo file like this:
uv run --locked python ringcentral/demos/demo_fax.py
The WebSocket subscription demo (demo_subscription.py) requires an application with the "WebSocket Subscriptions" permission.
Release is done by GitHub Action once a tag is pushed to the remote repo.
GitHub Action runs the following commands to release:
uv build --no-sources
uv run --locked twine upload dist/*
If you want to release it from your laptop, you need to have a ~/.pypirc file like this:
[distutils]
index-servers = pypi
[pypi]
repository = https://upload.pypi.org/legacy/
username = __token__
password = pypi-<your-token>
Then run the same release commands locally:
uv build --no-sources
uv run --locked twine upload dist/*