Skip to main content

Parses the things provided by twip such as donation, follow

Project description

Twip

PyPI version

이 라이브러리는 Twip의 공식 라이브러리가 아니며, Twip에서 스트리머들에게 제공하는 Alert Box를 이용해서 도네이션, 팔로우, 호스팅 등의 이벤트에 대해서 간편하게 대응하기 위해서 만들어졌습니다.

This library is not an official library of twip. It was created to conveniently respond to events such as donation, follow, and hosting using the Alert Box provided by twip to streamers.


📥 Installation

pip install twip-api

✍️ Examlpe

import twip

Twip = twip.Twip()

@Twip.event
def on_donate(ctx):
    print(f"id : {ctx.id}")
    print(f"nickname : {ctx.nickname}")
    print(f"amount : {ctx.amount}")
    print(f"comment : {ctx.comment}")
    
Twip.run("your alert box id", "your twip api token"")

더 많은 예제는 Github example.py 에서 확인하세요.

More examples on Github example.py

🔥 Events

  • on_donate : 후원, 영상후원, 슬롯머신(룰렛)
  • on_subscribe : 구독
  • on_hosting : 호스팅
  • on_cheer : 비트
  • on_follow : 팔로우
  • on_sound : 소리

  • on_donate : New Donation, Video, Slotmachines
  • on_subscribe : New subscription
  • on_hosting : New hosting
  • on_cheer : New bits cheer
  • on_follow : New follower
  • on_sound : Sound (If you do not access the twip alert box you will not receive any sound events.)

✨ Features

  • Class corresponding to each event element
  • Using Websockets (Not socket.io)
  • Use of decorators

🖥️ Tech

Twip uses a number of open source projects to work properly:

  • websocket-client- It provides access to low level APIs for WebSockets.
  • requests - An elegant and simple HTTP library for Python.
  • urllib - A package that collects several modules for working with URLs.
  • re - Regular expression matching operations.
  • warnings - Issue warnings by calling the warn() function defined in this module.

📖 Version

  • 0.0.7 : Fixed bug that occurred when there was no sound event.
  • 0.0.8 : Convert to receive api key input (#1)
  • 0.0.8.1 : Add token_crawl option (#1)
  • 0.0.8.2 : Fix function name change error

✔️ To be updated

  • 비동기 설정 추가
  • on_ready 이벤트 추가

  • Add async option
  • Add on_ready event

🕮 License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

twip_api-0.0.8.2-py3-none-any.whl (6.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page