Skip to main content

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.

pypi package Build Status Python Version

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


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.1.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distribution

zvolv_sdk-0.0.1-py3-none-any.whl (5.1 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