| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This repo has been deprecated, it's been superceded by https://github.com/livekit/python-sdks/
API Reference: https://docs.livekit.io/guides/server-api
import livekit
grant = livekit.VideoGrant(room_join=True, room="My Cool Room")
access_token = livekit.AccessToken("<api key>", "<api secret>", grant=grant, identity="bob", name="Bob")
token = access_token.to_jwt()import livekit
client = livekit.RoomServiceClient("<host>", "<api key>", "<api secret>")
client.mute_published_track(
room="<room name>",
identity="Bob",
track_sid="<track sid>",
muted=True,
)Make sure you clone with submodules:
$ git clone --recurse-submodules https://github.com/tradablebits/livekit-server-sdk-python.gitOr if you have already cloned:
$ git submodule update --initSet up the python virtual environment:
$ python3 -m venv env
$ source env/bin/activate
$ pip install --editable '.[dev]'
$ pre-commit installThe 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:
$ pytestThe build.sh script pulls the latest tag and builds
$ ./bin/build.sh| Back | FazBrowse Home | New Git URL |