Skip to main content

llama-index readers zulip integration

Project description

Zulip Loader

The Zulip Loader is a Python script that allows you to load data from Zulip streams using a Zulip bot's API token. It fetches messages from specified streams or all streams if none are specified, and returns a list of documents with the stream content.

Prerequisites

Create a Zulip bot and obtain its API token. Follow the instructions in the Zulip documentation to create a bot and get the API key (token).

Set the ZULIP_TOKEN environment variable to your Zulip bot's API token:

export ZULIP_TOKEN="your-zulip-bot-api-token"

Installation

You can install the Zulip Reader via pip:

pip install llama-index-readers-zulip

Usage

Use the ZulipReader class to load data from Zulip streams:

from zulip_loader import ZulipReader

# Initialize the ZulipReader with the bot's email and Zulip domain
reader = ZulipReader(
    zulip_email="your-bot-email@your-zulip-domain.zulipchat.com",
    zulip_domain="your-zulip-domain.zulipchat.com",
)

# Load data from all streams
data = reader.load_data(reader.get_all_streams())

# Load data from specific streams
stream_names = ["stream1", "stream2"]
data = reader.load_data(stream_names)
# This will return a list of documents containing the content of the specified streams.

For more customization, you can pass the reverse_chronological parameter to the load_data() method to indicate the order of messages in the output.

This loader is designed to be used as a way to load data into LlamaIndex and/or subsequently used as a Tool in a LangChain Agent.

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

llama_index_readers_zulip-0.5.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_readers_zulip-0.5.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_readers_zulip-0.5.0.tar.gz.

File metadata

  • Download URL: llama_index_readers_zulip-0.5.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_readers_zulip-0.5.0.tar.gz
Algorithm Hash digest
SHA256 7901b7481eeb3bf7c90af0e7d7ad55407e7a47de05fbcf29df444cb98a518d9a
MD5 6eec1dec703ddb63fce94c83f200221b
BLAKE2b-256 3e238870ad49186d343199adff41ca8305486166e7314f018a5983634e581a95

See more details on using hashes here.

File details

Details for the file llama_index_readers_zulip-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: llama_index_readers_zulip-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_readers_zulip-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33f19fa57eecaf4e4e08b4dd1d79337a33d930349d06a3e53845f5d445be782f
MD5 476864c5994ed2de6b99cd26d8a698a3
BLAKE2b-256 724ff2a5e938fdddc15af5728efaad2de5e79ad8a0ac4c8c097ac046ac107469

See more details on using hashes here.

Supported by

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