Skip to main content

The Zvolv API Platform SDK for Python

Project description

ZvolvClient SDK

Learn how to automate with Zvolv using Python.

Documentation

  • Docs site - explore our docs site and learn more about Zvolv.
  • User Guide - explore our user guide docs and learn more about sdk.

Getting started

Installation

You can install the Zvolv Python SDK using the following command.

pip install zvolv-sdk

Requires Python 3.0 or higher.

Usage

The Zvolv Hyper automation platform offers several APIs to build apps. Each Zvolv API delivers part of the capabilities from the platform, so that you can pick just those that fit for your needs. This SDK offers a corresponding package for each of Zvolv’s APIs.

Sending an email from Zvolv

One of the most simple use-cases is sending an email from Zvolv. In our examples, we specify the channel name, however it is recommended to use the channel_id where possible. Also, if your app's bot user is not in a channel yet, invite the bot user before running the code snippet (or add chat:write.public to Bot Token Scopes for posting in any public channels).

import os
from zvolv_sdk import WebClient
from zvolv_sdk.errors import ZvolvApiError

client = WebClient(token=os.environ['ZVOLV_BOT_TOKEN'])

try:
    response = client.chat_postMessage(channel='#random', text="Hello world!")
    assert response["message"]["text"] == "Hello world!"
except SlackApiError as e:
    # You will get a ZvolvApiError if "ok" is False
    assert e.response["ok"] is False
    assert e.response["error"]  # str like 'invalid_auth', 'channel_not_found'
    print(f"Got an error: {e.response['error']}")

Here we also ensure that the response back from Zvolv is a successful one and that the message is the one we sent by using the assert statement.

API References

  • Database ( authentication.Database )
  • Delegated ( authentication.Delegated )
  • Enterprise ( authentication.Enterprise )
  • API Authorization - Get Token ( authentication.GetToken)
  • Passwordless ( authentication.Passwordless )
  • RevokeToken ( authentication.RevokeToken )
  • Social ( authentication.Social )
  • Users ( authentication.Users )

Feedback


If you get stuck, we’re here to help. The following are the best ways to get assistance working through your issue:

Use our Github Issue Tracker for reporting bugs or requesting features. Visit the Zvolv Community for getting help using Slack Developer Kit for Python or just generally bond with your fellow Zvolv developers.

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

zvolv_sdk-0.0.6.tar.gz (11.2 kB view hashes)

Uploaded Source

Built Distribution

zvolv_sdk-0.0.6-py3-none-any.whl (12.4 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