Configuring the Python bindings

Zulip provides a set of tools that allows interacting with its API more easily, called the Python bindings. One of the most notable use cases for these bindings are bots developed using Zulip's bot framework.

In order to use them, you need to configure them with your identity (account, API key, and Zulip server URL). There are a few ways to achieve that:

  • Using a zuliprc file, referenced via the --config-file option or the config_file option to the zulip.Client constructor (recommended for bots).
  • Using a zuliprc file in your home directory at ~/.zuliprc (recommended for your own API key).
  • Using the environment variables documented here.
  • Using the --api-key, --email, and --site variables as command line parameters.
  • Using the api_key, email, and site parameters to the zulip.Client constructor.