Skip to main content

An unofficial Python library of Chzzk(Naver live-streaming service)

Project description

chzzkpy

PyPI - Version PyPI - Downloads PyPI - License

파이썬 기반의 치지직(네이버 라이브 스트리밍 서비스)의 비공식 라이브러리 입니다.
채팅 기능을 중점으로 개발하였으며, 다른 기능도 개발될 예정입니다.

An unofficial python library for Chzzk(Naver Live Streaming Service).
This library focused on chat. However, other feature will be developed.

Available Features

  • 채팅
    • 사용자 상호 채팅 (on_chat <-> client.send_chat)
    • 사용자 후원 (on_donation)
    • 메시지 상단 고정하기 (on_pin, on_unpin)
    • 시스템 메시지 (on_system_message)
  • 로그인 (쿠키 값 NID_AUT, NID_SES 사용)
  • 방송 상태 조회

Installation

Python 3.10 or higher is required.

# Linux/MacOS
python3 -m pip install chzzkpy

# Windows
py -3 -m pip install chzzkpy

Quick Example

chzzkpy를 사용한 예제는 Examples에서 확인하실 수 있습니다.
아래는 간단한 예제입니다.

챗봇 (Chat-Bot)

from chzzkpy.chat import ChatClient, ChatMessage, DonationMessage

client = ChatClient("channel_id")


@client.event
async def on_chat(message: ChatMessage):
    if message.content == "!안녕":
        await client.send_chat("%s님, 안녕하세요!" % message.profile.nickname)


@client.event
async def on_donation(message: DonationMessage):
    await client.send_chat("%s님, %d원 후원 감사합니다." % (message.profile.nickname, message.extras.pay_amount))


client.run("NID_AUT", "NID_SES")

Contributions

chzzkpy의 기여는 언제든지 환영합니다!
버그 또는 새로운 기능은 Pull Request로 진행해주세요.

Project details


Download files

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

Source Distribution

chzzkpy-0.0.4a1.tar.gz (15.5 kB view hashes)

Uploaded Source

Built Distribution

chzzkpy-0.0.4a1-py3-none-any.whl (30.5 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