{"id":51596621,"url":"https://github.com/isaackogan/TikTokLive","last_synced_at":"2026-07-11T19:01:18.718Z","repository":{"id":37576073,"uuid":"462948750","full_name":"isaackogan/TikTokLive","owner":"isaackogan","description":"The definitive Python library to receive livestream events (comments, gifts, etc.) in realtime from TikTok LIVE.","archived":false,"fork":false,"pushed_at":"2026-07-04T17:17:57.000Z","size":41263,"stargazers_count":1470,"open_issues_count":1,"forks_count":282,"subscribers_count":34,"default_branch":"master","last_synced_at":"2026-07-04T19:08:21.573Z","etag":null,"topics":["api","chat-reader","connector","printer","python","scraper","stream","tiktok","tiktok-api","tiktok-live","tiktok-printer","tiktok-scraper"],"latest_commit_sha":null,"homepage":"https://isaackogan.github.io/TikTokLive/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/isaackogan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"custom":"https://www.buymeacoffee.com/isaackogan"}},"created_at":"2022-02-24T00:08:43.000Z","updated_at":"2026-07-04T17:18:02.000Z","dependencies_parsed_at":"2023-02-19T09:01:47.188Z","dependency_job_id":"7660538d-414c-47bc-9a81-653f95832b3f","html_url":"https://github.com/isaackogan/TikTokLive","commit_stats":{"total_commits":555,"total_committers":16,"mean_commits":34.6875,"dds":0.04144144144144146,"last_synced_commit":"f6e7d0e485b7c3e1ba05c9677df1a2286ca603dd"},"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"purl":"pkg:github/isaackogan/TikTokLive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaackogan%2FTikTokLive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaackogan%2FTikTokLive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaackogan%2FTikTokLive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaackogan%2FTikTokLive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isaackogan","download_url":"https://codeload.github.com/isaackogan/TikTokLive/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isaackogan%2FTikTokLive/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35372639,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-11T02:00:05.354Z","response_time":104,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","chat-reader","connector","printer","python","scraper","stream","tiktok","tiktok-api","tiktok-live","tiktok-printer","tiktok-scraper"],"created_at":"2026-07-11T19:01:17.044Z","updated_at":"2026-07-11T19:01:18.703Z","avatar_url":"https://github.com/isaackogan.png","language":"Python","funding_links":["https://www.buymeacoffee.com/isaackogan"],"categories":["Social Media Crawlers"],"sub_categories":[],"readme":"TikTok LIVE API for Python (Unofficial)\n==================\n\nThe #1 [TikTok LIVE API](https://www.eulerstream.com/) Client for Python (Unofficial, Unaffiliated with ByteDance Ltd.) - Connect to any [TikTok LIVE](https://www.tiktok.com/live) stream and receive real-time chats, gifts, likes, follows \u0026 more! With this library you can connect to any TikTok livestream and fetch all data available to users in a stream using just a creator's `@unique_id`.\n\n[![Discord](https://img.shields.io/discord/977648006063091742?logo=discord\u0026label=TikTokLive%20Discord\u0026labelColor=%23171717\u0026color=%231877af)](https://discord.gg/N3KSxzvDX8)\n![Connections](https://api.eulerstream.com/analytics/pips)\n![Downloads](https://pepy.tech/badge/tiktoklive)\n![Stars](https://img.shields.io/github/stars/isaackogan/TikTokLive?style=flat\u0026color=0274b5)\n![Forks](https://img.shields.io/github/forks/isaackogan/TikTokLive?style=flat\u0026color=0274b5)\n![Issues](https://img.shields.io/github/issues/isaackogan/TikTokLive)\n\n\u003e **Note:** This is \u003cstrong\u003enot\u003c/strong\u003e a production-ready API. It is a reverse engineering project. Use the [WebSocket API](https://www.eulerstream.com/websockets) for production.\n\n\u003c!--\n\u003ca href=\"https://www.eulerstream.com/websockets\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://www.eulerstream.com/api/advert?l2=WebSocket+API\u0026r=15\u0026b=1.5\u0026bc=404854\u0026o=0.95\"/\u003e\n\u003c/a\u003e\n--\u003e\n\n## TikTok LIVE API\n\n\u003ctable\u003e\n\u003ctr\u003e\n    \u003ctd\u003e\u003cbr/\u003e\u003cimg width=\"180px\" style=\"border-radius: 10px\" src=\"https://raw.githubusercontent.com/isaackogan/TikTokLive/master/.github/SquareLogo.png\"\u003e\u003cbr/\u003e\u003cbr/\u003e\u003c/td\u003e\n    \u003ctd\u003e\n        \u003ca href=\"https://www.eulerstream.com/\"\u003e\n            \u003cstrong\u003eEuler Stream\u003c/strong\u003e offers a comprehensive TikTok LIVE API, WebSocket Server, CAPTCHA Solutions and much more!\n        \u003c/a\u003e\n    \u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!--\nTemporarily Removed May 3rd 2025\n\n## Author's Choice\n\nThe following are my two favourite enterprise use-cases for the TikTokLive family of libraries. This is \u003cstrong\u003enot\u003c/strong\u003e paid promotion, and I receive nothing for these recommendations:\n\n\u003ctable\u003e\n\u003ctr\u003e\n    \u003ctd\u003e\u003cbr/\u003e\u003cimg width=\"180px\" style=\"border-radius: 10px\" src=\"https://tiktory.com/images/meta/favicon.svg\"\u003e\u003cbr/\u003e\u003cbr/\u003e\u003c/td\u003e\n    \u003ctd\u003e\n        \u003ca href=\"https://www.tiktory.com\"\u003e\n            \u003cstrong\u003eTiktory\u003c/strong\u003e provides highly advanced custom overlays, follower alerts, and real-time goal tracking. Seamlessly integrate with OBS and stand out from the crowd!\n        \u003c/a\u003e\n    \u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\u003ctable\u003e\n\u003ctr\u003e\n    \u003ctd\u003e\u003cbr/\u003e\u003cimg width=\"180px\" style=\"border-radius: 10px\" src=\"https://cdn.casterlabs.co/branding/casterlabs/icon.svg\"\u003e\u003cbr/\u003e\u003cbr/\u003e\u003c/td\u003e\n    \u003ctd\u003e\n        \u003ca href=\"https://casterlabs.co/\"\u003e\n            \u003cstrong\u003eCasterlabs\u003c/strong\u003e is a powerful tool that unifies chats from various streaming platforms, providing a combined chat view, customizable alerts, and handy on-screen widgets for streamers!\n        \u003c/a\u003e\n    \u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n--\u003e\n\n## Table of Contents\n\n- [Getting Started](#getting-started)\n    - [Parameters](#parameters)\n    - [Methods](#methods)\n    - [Properties](#properties)\n    - [WebDefaults](#webdefaults)\n- [Documentation](https://isaackogan.github.io/TikTokLive/)\n- [Other Languages](#other-languages)\n- [Community](#community)\n- [Examples](https://github.com/isaackogan/TikTokLive/tree/master/examples)\n- [Licensing](#license)\n- [Star History](#star-history)\n- [Contributors](#contributors)\n\n## Community\n\nJoin the [TikTokLive discord](https://discord.gg/e2XwPNTBBr) and visit\nthe [`#py-support`](https://discord.gg/uja6SajDxd)\nchannel for questions, contributions and ideas.\n\n## Getting Started\n\n1. Install the module via pip from the [PyPi](https://pypi.org/project/TikTokLive/) repository\n\n```shell script\npip install TikTokLive\n```\n\n2. Create your first chat connection\n\n```python\nfrom TikTokLive import TikTokLiveClient\nfrom TikTokLive.events import ConnectEvent, CommentEvent\n\n# Create the client\nclient: TikTokLiveClient = TikTokLiveClient(unique_id=\"@isaackogz\")\n\n\n# Listen to an event with a decorator!\n@client.on(ConnectEvent)\nasync def on_connect(event: ConnectEvent):\n    print(f\"Connected to @{event.unique_id} (Room ID: {client.room_id}\")\n\n\n# Or, add it manually via \"client.add_listener()\"\nasync def on_comment(event: CommentEvent) -\u003e None:\n    print(f\"{event.user.nickname} -\u003e {event.comment}\")\n\n\nclient.add_listener(CommentEvent, on_comment)\n\nif __name__ == '__main__':\n    # Run the client and block the main thread\n    # await client.start() to run non-blocking\n    client.run()\n```\n\nFor more quickstart examples, see the [examples folder](https://github.com/isaackogan/TikTokLive/tree/master/examples)\nprovided in the source tree.\n\n## Other Languages\n\nTikTokLive is available in several alternate programming languages:\n\n- **Node.JS:** [https://github.com/zerodytrash/TikTok-Live-Connector](https://github.com/zerodytrash/TikTok-Live-Connector)\n- **Java:** [https://github.com/jwdeveloper/TikTok-Live-Java](https://github.com/jwdeveloper/TikTok-Live-Java)\n- **C#/Unity:** [https://github.com/frankvHoof93/TikTokLiveSharp](https://github.com/frankvHoof93/TikTokLiveSharp)\n- **Go:** [https://github.com/steampoweredtaco/gotiktoklive](https://github.com/steampoweredtaco/gotiktoklive)\n- **Rust:** [https://github.com/jwdeveloper/TikTokLiveRust](https://github.com/jwdeveloper/TikTokLiveRust)\n\n## Parameters\n\n| Param Name | Required | Default | Description                                                                                                                                                                                                               |\n|------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| unique_id  | Yes      | N/A     | The unique username of the broadcaster. You can find this name in the URL of the user. For example, the `unique_id` for [`https://www.tiktok.com/@isaackogz`](https://www.tiktok.com/@isaackogz) would be `isaackogz`.    |\n| web_proxy  | No       | `None`  | TikTokLive supports proxying HTTP requests. This parameter accepts an `httpx.Proxy`. Note that if you do use a proxy you may be subject to reduced connection limits at times of high load.                               |\n| ws_proxy   | No       | `None`  | TikTokLive supports proxying the websocket connection. This parameter accepts an `httpx.Proxy`. Using this proxy will never be subject to reduced connection limits.                                                      |\n| web_kwargs | No       | `{}`    | Under the scenes, the TikTokLive HTTP client uses the [`httpx`](https://github.com/encode/httpx) library. Arguments passed to `web_kwargs` will be forward the the underlying HTTP client.                                |\n| ws_kwargs  | No       | `{}`    | Under the scenes, TikTokLive uses the [`websockets`](https://github.com/python-websockets/websockets) library to connect to TikTok. Arguments passed to `ws_kwargs` will be forwarded to the underlying WebSocket client. |\n\n## Methods\n\nA `TikTokLiveClient` object contains the following methods worth mentioning:\n\n| Method Name  | Notes   | Description                                                                                                                                                                         |\n|--------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| run          | N/A     | Connect to the livestream and block the main thread. This is best for small scripts.                                                                                                |\n| add_listener | N/A     | Adds an *asynchronous* listener function (or, you can decorate a function with `@client.on(Type[Event])`) and takes two parameters, an event name and the payload, an AbstractEvent ||\n| connect      | `async` | Connects to the tiktok live chat while blocking the current future. When the connection ends (e.g. livestream is over), the future is released.                                     |\n| start        | `async` | Connects to the live chat without blocking the main thread. This returns an `asyncio.Task` object with the client loop.                                                             |\n| disconnect   | `async` | Disconnects the client from the websocket gracefully, processing remaining events before ending the client loop.                                                                    |\n\n## Properties\n\nA `TikTokLiveClient` object contains the following important properties:\n\n| Attribute Name | Description                                                                                                                                                 |\n|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| room_id        | The Room ID of the livestream room the client is currently connected to.                                                                                    |\n| web            | The TikTok HTTP client. This client has a lot of useful routes you should explore!                                                                          |\n| connected      | Whether you are currently connected to the livestream.                                                                                                      |\n| logger         | The internal logger used by TikTokLive. You can use `client.logger.setLevel(...)` method to enable client debug.                                            |\n| room_info      | Room information that is retrieved from TikTok when you use a connection method (e.g. `client.connect`) with the keyword argument `fetch_room_info=True` .  |\n| gift_info      | Extra gift information that is retrieved from TikTok when you use a connection method (e.g. `client.run`) with the keyword argument `fetch_gift_info=True`. |\n\n## WebDefaults\n\nTikTokLive has a series of global defaults used to create the HTTP client which you can customize. For info on how to set these parameters, see\nthe [web_defaults.py](https://github.com/isaackogan/TikTokLive/blob/master/examples/web_defaults.py) example.\n\n| Parameter                   | Type   | Description                                                                                                                                                                   |\n|-----------------------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| tiktok_sign_api_key         | `str`  | A [Euler Stream](https://www.eulerstream.com/) API key used to increase rate limits.                                                                                          |\n| tiktok_app_url              | `str`  | The TikTok app URL (`https://www.tiktok.com`) used to scrape the room.                                                                                                        |\n| tiktok_sign_url             | `str`  | The [signature server](https://www.eulerstream.com/) used to generate tokens to connect to TikTokLive. By default, this is Euler Stream, but you can swap your own with ease. |\n| tiktok_webcast_url          | `str`  | The TikTok livestream URL (`https://webcast.tiktok.com`) where livestreams can be accessed from.                                                                              |\n| web_client_params           | `dict` | The URL parameters added on to TikTok requests from the HTTP client.                                                                                                          |\n| web_client_headers          | `dict` | The headers added on to TikTok requests from the HTTP client.                                                                                                                 |\n| web_client_cookies          | `dict` | Custom cookies to initialize the http client with.                                                                                                                            |\n| ws_client_params            | `dict` | The URL parameters added to the URI when connecting to TikTok's Webcast WebSocket server.                                                                                     |\n| ws_client_params_append_str | `dict` | Extra string data to append to the TikTokLive WebSocket connection URI.                                                                                                       |\n| ws_client_headers           | `dict` | Extra headers to append to the TikTokLive WebSocket client.                                                                                                                   |\n\n## Events\n\nEvents can be listened to using a decorator or non-decorator method call. The following examples illustrate how you can listen to an event:\n\n```python\n@client.on(LikeEvent)\nasync def on_like(event: LikeEvent) -\u003e None:\n    ...\n\n\nasync def on_comment(event: CommentEvent) -\u003e None:\n    ...\n\n\nclient.add_listener(CommentEvent, on_comment)\n```\n\nThere are two types of events, [`CustomEvent`](https://github.com/isaackogan/TikTokLive/blob/master/TikTokLive/events/custom_events.py)\nevents and [`ProtoEvent`](https://github.com/isaackogan/TikTokLive/blob/master/TikTokLive/events/proto_events.py) events.\nBoth belong to the TikTokLive `Event` type and can be listened to. The following events are available:\n\n### Custom Events\n\n- `ConnectEvent` - Triggered when the Webcast connection is initiated\n- `DisconnectEvent` - Triggered when the Webcast connection closes (including the livestream ending)\n- `LiveEndEvent` - Triggered when the livestream ends\n- `LivePauseEvent` - Triggered when the livestream is paused\n- `LiveUnpauseEvent` - Triggered when the livestream is unpaused\n- `FollowEvent` - Triggered when a user in the livestream follows the streamer\n- `ShareEvent` - Triggered when a user shares the livestream\n- `SuperFanEvent` - Triggered when a viewer becomes a super fan of the streamer\n- `SuperFanJoinEvent` - Triggered when an existing super fan joins the live (distinct from `SuperFanEvent`)\n- `SuperFanBoxEvent` - Triggered when a super-fan envelope (gift box) is delivered\n- `WebsocketResponseEvent` - Triggered when any event is received (contains the event)\n- `UnknownEvent` - An instance of `WebsocketResponseEvent` thrown whenever an event does not have an existing definition, useful for debugging\n\n### Proto Events\n\nThese events are auto-generated from the\n[TikTokLiveProto](https://pypi.org/project/TikTokLiveProto/) v3 schema. Only\nevents whose proto messages are present in v3 are emitted; if you don't see\none you used to rely on, it's because TikTok removed it from the schema.\n\nIf you know what an event does that's missing a description below,\n[make a pull request](https://github.com/isaackogan/TikTokLive/pulls) and add it.\n\n\u003cul\u003e\n\u003cli\u003e\u003ccode\u003eBarrageEvent\u003c/code\u003e - A \"VIP\" viewer (based on gifting level) joins the chat room\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eCaptionEvent\u003c/code\u003e - Auto-caption update from the host's audio\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eCommentEvent\u003c/code\u003e - A viewer sent a chat comment\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eControlEvent\u003c/code\u003e - Stream action (e.g. start, end, pause, unpause)\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eEmoteChatEvent\u003c/code\u003e - A custom emote was sent in chat\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eEnvelopeEvent\u003c/code\u003e - A treasure chest / envelope was sent\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eGiftEvent\u003c/code\u003e - A gift was sent (see \u003ca href=\"#giftevent\"\u003eGift handling\u003c/a\u003e below)\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eGoalUpdateEvent\u003c/code\u003e - Subscriber/follow goal updated\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eHourlyRankRewardEvent\u003c/code\u003e - Hourly rank reward delivered\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eImDeleteEvent\u003c/code\u003e - A viewer's messages were deleted by a moderator\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eInRoomBannerEvent\u003c/code\u003e - In-room banner notice\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eJoinEvent\u003c/code\u003e - A viewer joined the livestream\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eLikeEvent\u003c/code\u003e - The stream received likes\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eLinkEvent\u003c/code\u003e - Generic link-mic event\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eLinkLayerEvent\u003c/code\u003e - Link-mic layer/visibility change\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eLinkMicArmiesEvent\u003c/code\u003e - A battle user received points\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eLinkMicBattleEvent\u003c/code\u003e - A battle was started\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eLinkMicBattlePunishFinishEvent\u003c/code\u003e - A battle's punishment phase ended\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eLinkMicFanTicketMethodEvent\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eLinkMicMethodEvent\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eLinkmicBattleTaskEvent\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eLiveIntroEvent\u003c/code\u003e - Live-intro message appears\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eMessageDetectEvent\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eOecLiveShoppingEvent\u003c/code\u003e - Live-shopping signal\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003ePollEvent\u003c/code\u003e - The creator launched / updated a poll\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eQuestionNewEvent\u003c/code\u003e - Someone asked a new question via the question feature\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eRankTextEvent\u003c/code\u003e - Gift count made a viewer enter the top three\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eRankUpdateEvent\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eRoomEvent\u003c/code\u003e - Broadcast message to all room users (e.g. \"Welcome to TikTok LIVE!\")\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eRoomPinEvent\u003c/code\u003e - A message was pinned\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eRoomUserSeqEvent\u003c/code\u003e - Current viewer count information\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eSocialEvent\u003c/code\u003e - A viewer shared or followed the host (also surfaced as \u003ccode\u003eFollowEvent\u003c/code\u003e / \u003ccode\u003eShareEvent\u003c/code\u003e custom events)\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eSystemEvent\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eUnauthorizedMemberEvent\u003c/code\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\n#### New in 7.X.X\n\n\u003cul\u003e\n\u003cli\u003e\u003ccode\u003eAccessControlEvent\u003c/code\u003e - Access-control update for the room (e.g. CAPTCHA challenge issued to a viewer)\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eAccessRecallEvent\u003c/code\u003e - Access restriction lifted / recalled for a viewer\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eBoostCardEvent\u003c/code\u003e - Boost cards delivered to the room\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eBottomEvent\u003c/code\u003e - Bottom-of-screen notice (often a punishment or violation banner)\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eCapsuleEvent\u003c/code\u003e - In-room capsule / promotional pill notice\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eGameRankNotifyEvent\u003c/code\u003e - Game-rank notification\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eGiftBroadcastEvent\u003c/code\u003e - Big gift broadcast notice across rooms\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eGiftDynamicRestrictionEvent\u003c/code\u003e - Dynamic gift restriction update\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eGiftPanelUpdateEvent\u003c/code\u003e - Gift panel content update\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eGiftPromptEvent\u003c/code\u003e - Anti-addiction / spending-limit prompt before gifting\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eGuideEvent\u003c/code\u003e - In-room guide / tooltip prompt\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eLinkMicLayoutStateEvent\u003c/code\u003e - Link-mic layout state update\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eLinkStateEvent\u003c/code\u003e - Link-mic channel state update\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eLiveGameIntroEvent\u003c/code\u003e - Live-game intro message\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eMarqueeAnnouncementEvent\u003c/code\u003e - Marquee announcement scrolling across the room\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eNoticeEvent\u003c/code\u003e - Generic notice / system tip in the room\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003ePartnershipDropsUpdateEvent\u003c/code\u003e - Partnership drops campaign update\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003ePartnershipGameOfflineEvent\u003c/code\u003e - Partnership game taken offline\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003ePartnershipPunishEvent\u003c/code\u003e - Partnership punishment notice\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003ePerceptionEvent\u003c/code\u003e - Perception dialog (warning / violation surfaced to a viewer)\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eRoomNotifyEvent\u003c/code\u003e - Room-wide notification banner\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eRoomVerifyEvent\u003c/code\u003e - Room verification action (e.g. forced verify / close)\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eSpeakerEvent\u003c/code\u003e - Active speaker update (link-mic audio)\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eSubNotifyEvent\u003c/code\u003e - Subscription notification (subscribe / renew / gift sub)\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eSubPinEventEvent\u003c/code\u003e - Subscription pin card action\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eToastEvent\u003c/code\u003e - Transient toast notification\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eViewerPicksUpdateEvent\u003c/code\u003e - Viewer-picks (audience-driven prompt) update\u003c/li\u003e\n\u003c/ul\u003e\n\n### `GiftEvent`\n\nFires every time a gift is sent. Extra static metadata for every gift type\nin the room can be fetched once on connect by passing\n`fetch_gift_info=True` to `client.run()` / `client.start()`; the result is\ncached on `client.gift_info`.\n\n\u003e **Streaks**: streakable gifts trigger multiple `GiftEvent`s as the viewer\n\u003e ramps up the streak, with `event.repeat_count` incrementing each time.\n\u003e The final gift in a streak carries `event.repeat_end == 1`. Use the\n\u003e `event.streaking` helper to filter intermediate events out and only act\n\u003e on the final one.\n\n```python\n@client.on(GiftEvent)\nasync def on_gift(event: GiftEvent):\n    gift = event.gift\n    if gift is None:\n        return\n\n    # Streakable gift \u0026 streak is over\n    if not event.streaking and gift.type == 1:  # ``type == 1`` is streakable\n        print(f\"{event.user.unique_id} sent {event.repeat_count}x \\\"{gift.name}\\\"\")\n\n    # Non-streakable gift\n    elif gift.type != 1:\n        print(f\"{event.user.unique_id} sent \\\"{gift.name}\\\"\")\n```\n\nIn v3 the canonical `Gift` field names are `name`, `type`, and `image`. The\nv2-era prefixed names (`gift_name`, `gift_type`, `gift_image`) remain\navailable as read-only aliases on `ExtendedGift` for backwards compatibility.\nWrap a `Gift` in `ExtendedGift(...)` if you want the `.streakable` helper.\n\n## Checking If A User Is Live\n\nIt is considered inefficient to use the connect method to check if a user is live. It is better to use the dedicated `await client.is_live()` method.\n\nThere is a [complete example](https://github.com/isaackogan/TikTokLive/blob/master/examples/check_live.py) of how to do this in the [examples](https://github.com/isaackogan/TikTokLive/tree/master/examples) folder.\n\n## Star History\n\n\u003cp align=\"center\"\u003e\n    \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=isaackogan/TikTokLive\u0026type=Date\u0026theme=dark\" onerror=\"this.src='https://api.star-history.com/svg?repos=isaackogan/TikTokLive\u0026type=Date'\" /\u003e\n\u003c/p\u003e\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contributors\n\n* **Isaac Kogan** - *Creator, Primary Maintainer, and Reverse-Engineering* - [isaackogan](https://github.com/isaackogan)\n* **Zerody** - *Creator of the NodeJS library, introduced me to scraping TikTok LIVE* - [Zerody](https://github.com/zerodytrash/)\n\nSee also the full list of secondary [contributors](https://github.com/isaackogan/TikTokLive/contributors) who have participated in\nthis project.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaackogan%2FTikTokLive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisaackogan%2FTikTokLive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisaackogan%2FTikTokLive/lists"}