Skip to main content

Twip

PyPI version Downloads Downloads

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


📥 설치

pip install twip-api

✍️ Example

from twip import Twip, Donate, Follow, Subscribe, Hosting, Cheer, Sound, Slotmachine

class MyTwip(Twip):
    def on_ready(self):
        print("Twip is ready!")

    def on_donate(self, donate: Donate):
        print(donate)

    def on_follow(self, follow: Follow):
        print(follow)

    def on_subscribe(self, subscribe: Subscribe):
        print(subscribe)

    def on_hosting(self, hosting: Hosting):
        print(hosting)

    def on_cheer(self, cheer: Cheer):
        print(cheer)

    def on_sound(self, sound: Sound):
        print(sound)

if __name__ == "__main__":
    myTwip = MyTwip()
    myTwip.run("your alert box id", "your twip api token")

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

🔥 Events

  • on_ready : 트윕과 처음으로 연결되었을 때
  • on_donate : 후원, 영상후원, 슬롯머신(룰렛)
  • on_subscribe : 구독
  • on_hosting : 호스팅
  • on_cheer : 비트
  • on_follow : 팔로우
  • on_sound : 소리

📖 Version

  • 0.0.7 : 사운드 이벤트가 없을 때 발생하던 버그 수정
  • 0.0.8 : api key를 직접 입력 받도록 수정 (#1)
  • 0.0.8.1 : 토큰 크롤링 옵션 추가 (#1)
  • 0.0.8.2 : 함수 이름 관련 버그 수정
  • 0.0.9 : on_ready 이벤트 추가
  • 0.0.9.1 : 크롤링된 토큰이 유효기간이 지난 후에도 계속해서 사용되던 버그 수정
  • 1.0.0 : 타입 힌트 추가 및 구조 개편

🕮 License

기타문의

Release files for twip-api 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for twip-api 1.0.0
File Interpreter ABI Platform
twip_api-1.0.0-py3-none-any.whl Python 3 none any Details

Release files / twip_api-1.0.0-py3-none-any.whl

Download URL twip_api-1.0.0-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20b3199b43101d219497074d97fc01e0ad4e77a670ebef0917f5686d6cf93fdc
BLAKE2b-256 checksum
How to use checksums
29dd230d4dbd873d185c1467215e493910da6f95f26eb31656cc96c4ecc956eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file

0.0.9.1

1 release file

0.0.9

1 release file

0.0.8.2

1 release file

0.0.8.1

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page