Unofficial Python API wrapper for TikTok Live
Project description
TikTokLiveWrapper
This project allows you to connect to TikTok livestreams and access available data using a creator's @username
. It is designed to retrieve information from TikTok livestreams and cannot be used to post content or simulate interactions.
Getting Started
-
Install the module:
pip install TikTokLiveWrapper
Create a connection to the chat:
from TikTokLiveWrapper import TikTokLiveClient
from TikTokLiveWrapper.events import ConnectEvent, CommentEvent
client = TikTokLiveClient(unique_id="@username")
@client.on(ConnectEvent)
async def on_connect(event):
print(f"Connected to @{event.unique_id}")
async def on_comment(event):
print(f"{event.user.nickname} -> {event.comment}")
client.add_listener(CommentEvent, on_comment)
client.run()
Key Methods
- run: Connect to the livestream.
- add_listener: Add a listener for events.
Events
Available events include: ConnectEvent, CommentEvent.
License
MIT License. See the LICENSE file for details.
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
tiktoklivewrapper-1.0.0.tar.gz
(42.6 kB
view details)
File details
Details for the file tiktoklivewrapper-1.0.0.tar.gz
.
File metadata
- Download URL: tiktoklivewrapper-1.0.0.tar.gz
- Upload date:
- Size: 42.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87f41235f771b5965588e2c1a74e868a4fba896df2841072ff688e7ea44ca771 |
|
MD5 | 7efd9e1e8ca03a72cd6984b2e51ee593 |
|
BLAKE2b-256 | e11b2cb28be1262eb7d39e5425bbdd4749226050e582437dd540e6bc421d1dee |