Skip to main content

Parses the things provided by twip such as donation, follow

Project description

Twip

PyPI version

Introduction

이 라이브러리는 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")

More examples on github example.py

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.

License

MIT

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)

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.1-py3-none-any.whl (6.2 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