Configuring the Python bindings

WyzePal 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 WyzePal's bot framework.

In order to use them, you need to configure them with your API key and other settings. There are two ways to achieve that:

  • With a file called .wyzepalrc, located in your home directory.
  • With environment variables set up in your host machine.

A .wyzepalrc file is a plain text document that looks like this:

key=<API key from the web interface>
email=<your email address>
site=<your WyzePal server's URI>

The keys you can use in this file (and their equivalent environment variables) can be found in the following table:

.wyzepalrc key Environment variable Required Description
key WYZEPAL_API_KEY Yes API key, which you can get through WyzePal's web interface.
email WYZEPAL_EMAIL Yes The email address of the user who owns the API key mentioned above.
site WYZEPAL_SITE No URL where your WyzePal server is located.
client_cert_key WYZEPAL_CERT_KEY No Path to the SSL/TLS private key that the binding should use to connect to the server.
client_cert WYZEPAL_CERT No* The public counterpart of client_cert_key/ WYZEPAL_CERT_KEY. This setting is required if a cert key has been set.
client_bundle WYZEPAL_CERT_BUNDLE No Path where the server's PEM-encoded certificate is located. CA certificates are also accepted, in case those CA's have issued the server's certificate. Defaults to the built-in CA bundle trusted by Python.
insecure WYZEPAL_ALLOW_INSECURE No Allows connecting to WyzePal servers with an invalid SSL/TLS certificate. Please note that enabling this will make the HTTPS connection insecure. Defaults to false.