Livekit Server SDK for Python
Reason this release was yanked:
Broken import paths
Project description
LiveKit Server SDK
API Reference: https://docs.livekit.io/guides/server-api
Examples
Generate Access Token for a Client
from livekit import AccessToken, VideoGrant
grant = VideoGrant(room_join=True, room="My Cool Room")
access_token = AccessToken("<api key>", "<api secret>", grant=grant, identity="Bob")
token = access_token.to_jwt()
Using RoomServiceClient
from livekit import RoomServiceClient
client = RoomServiceClient("<host>", "<api key>", "<api secret>")
client.mute_published_track(room="<room name>", track="<track sid>")
Local Development
Dependencies
- golang >= 1.17
- protoc
- Ubuntu:
sudo apt install protobuf-compiler
- Ubuntu:
- protoc-gen-twirpy
go install github.com/verloop/twirpy/protoc-gen-twirpy@latest
- make sure
~/go/bin
is in your$PATH
- pre-commit
Environment Setup
Please make sure you have installed pre-commit, and install the hooks:
$ pre-commit install
Set up the python virtual environment:
$ python3 -m venv env
$ source env/bin/activate
$ pip install --editable '.[dev]'
Run tests
The RoomServiceClient
tests require a running LiveKit server.
See the LiveKit Getting Started page.
The tests use the following environment variables to locate the LiveKit server.
export LIVEKIT_HOST='http://localhost:7880'
export LIVEKIT_API_KEY='<api key>'
export LIVEKIT_API_SECRET='<api secret>'
Run the tests:
$ pytest
Updating protocol
The build.sh
script pulls the latest tag and builds
$ ./bin/build.sh
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for livekit_server_sdk_python-0.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b13d24c35b413df85d83bb4b249d31f5c09a108261752c484c5622410ac88411 |
|
MD5 | 3f4a29088610747d6c9bd2d14230afcd |
|
BLAKE2b-256 | cf89e1ca04504da5537511260dd3e31beee0c7e633392f7e953e04dedc360ebf |
Close
Hashes for livekit_server_sdk_python-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 834c52f8f41be48d943e1f2de96103a5902e358e259cfd95f7b2790ddda29f17 |
|
MD5 | 2a71976ff39dab17a59b48289a5aa54a |
|
BLAKE2b-256 | 138167a8c67e229e9a81e0a38f0dd951e2ae3533ccaba566286029f137d1364e |