Skip to main content

The unofficial bot API for Zulip.

Project description

The unofficial Python API for Zulip bots. A Zulip email and API key are needed to use this.

To get your bot’s Zulip email and API key, go to your Settings page and scroll down to the Your Bots section.

Usage

To install: pip install zulipbot

Initialization

Identify your Zulip bot’s email and API key, and make a new Bot object.

>>> import zulipbot
>>> email = 'foo@bar.baz'
>>> key = 'spammyeggs'
>>> my_bot = zulipbot.Bot(email, key)

Bot Methods

For an example on how the below methods work together in a program, check out example.py.

subscribe_to_all_streams - Subscribes to all Zulip streams.

send_private_message and send_stream_message both have the same parameters: message_info and content, i.e. the function signature for the two aforementioned methods is send_[[private||stream]]_message(message_info, content).

message_info is the message meta-info dictionary that you acquire from the function callback that processes messages. content is the response that you want your bot to make.

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

zulipbot-0.0.1.tar.gz (6.6 kB view details)

Uploaded Source

File details

Details for the file zulipbot-0.0.1.tar.gz.

File metadata

  • Download URL: zulipbot-0.0.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for zulipbot-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d35ef8a69270c07df17cba2296348472d36da081d81d85258ed0737d3d7b3c65
MD5 11a62a61cde9dacb7099ad46c2ae97ba
BLAKE2b-256 9aa184bcd2a33f20e8617a2476f9266d3b19cbd3741d812a54d85c0e37b4ad96

See more details on using hashes here.

Supported by

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