The Zvolv API Platform SDK for Python
Project description
Python Zvolv SDK
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. They are small and powerful when used independently, and work seamlessly when used together, too.
Whether you're building a custom app for your team, or integrating a third party service into your Zvolv workflows, Zvolv Developer Kit for Python allows you to leverage the flexibility of Python to get your project up and running as quickly as possible.
Table of contents
Requirements
This library requires Python 3.6 and above.
Note: You may need to use
python3
before your commands to ensure you use the correct Python path. e.g.python3 --version
python --version
-- or --
python3 --version
Installation
We recommend using PyPI to install the Zvolv Developer Kit for Python.
$ pip install zvolv_sdk
Getting started tutorial
Zvolv provide a Web API that gives you the ability to build applications that interact with Zvolv Hyper automation platform in a variety of ways. This Development Kit is a module based wrapper that makes interaction with that API easier. We have a basic example here with some of the more common uses but a full list of the available methods are available here. More detailed examples can be found in our guide.
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.
Support
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for zvolv_sdk-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 894a3444adb377079064c2dfb89218d17f82bcd9eb9cd951fb9dfae0e7cc2755 |
|
MD5 | 4af067345f05e124bfbda70adea9f3a8 |
|
BLAKE2b-256 | 02cd98aee21b274d654221b2a25750171164440279d3414924343dcc9d3f1569 |