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.
  • Examples - explore our examples docs and learn more about using 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

Initialize ZvolvClient

Once the package is installed, you can import the library using import or require approach.

Initializes the ZvolvClient with the base url of the Zvolv server:

from zvolv_sdk import ZvolvClient

client = ZvolvClient(BASE_URL)

BASE_URL is the host address on which your Zvolv workspace is deployed, unless you have isolated custom deployment use 'https://app.zvolv.com'.

Initialize Workspace

Before performing any operation, SDK needs your workspace context. Use below method to initialize your workspace

try:
    workspace = client.workspace.init(DOMAIN)
except Error:
    print(Error)

DOMAIN is your unique workspace identifier

Perform Authentication

Zvolv modules are access contolled, you need valid user crendentials to invoke any module methods. Use below method for authentication.

try:
    login = client.auth.login(EMAIL, PASSWORD)
except Error:
    print(Error)

You can use any valid zvolv user's EMAIL & PASSWORD from your workspace

API references

Zvolv comprises various modules to achieve respective business operations. Use below modules & methods to interact with Zvolv APIs.

Forms

Create a Form

from zvolv_sdk.models.form import Form

form = Form(...)
response = client.forms.post(form)

Use Form model with required attributes

Update a Form

from zvolv_sdk.models.form import Form

form = Form(...)
response = client.forms.put(form)

Use Form model with id or uuid & other required attributes

Get a Form

from zvolv_sdk.models.form import Form

response: Form = client.forms.get(ID)

ID is unique form identifier

Submissions

Create a Submission

from zvolv_sdk.models.submission import Submission

submission = Submission(...)
response = client.submissions.post(submission)

Use Submission model with elements to be created

Update a Submission

from zvolv_sdk.models.submission import Submission

submission = Submission(...)
response = client.submissions.put(submission)

Use Submission model with id & elements to be updated

Get a Submission

from zvolv_sdk.models.submission import Submission

response: Submission = client.submissions.get(ID)

ID is unique submission identifier

Search Submissions

from elasticsearch_dsl import Q, Search

search_obj = Search()
bool_query = Q('bool', must=[Q(...)])
search_obj = search_obj.query(bool_query)

response = client.submissions.search(FORM_ID, search_obj)

search method support elastic queries. Generate your query with help of elasticsearch_dsl

Tasks

Create a Task

from zvolv_sdk.models.task import Task

task = Task(...)
response = client.tasks.post(task)

Use Task model with required attributes

Update a Task

from zvolv_sdk.models.task import Task

task = Task(...)
response = client.tasks.put(task)

Use Task model with id & required attributes to be updated

Get a Task

from zvolv_sdk.models.task import Task

response: Task = client.tasks.get(ID)

ID is unique task identifier

Search Tasks

from elasticsearch_dsl import Q, Search

search_obj = Search()
bool_query = Q('bool', must=[Q(...)])
search_obj = search_obj.query(bool_query)

response = client.tasks.search(search_obj)

search method support elastic queries. Generate your query with help of elasticsearch_dsl

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 Zvolv 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.36.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zvolv_sdk-0.0.36-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

Details for the file zvolv_sdk-0.0.36.tar.gz.

File metadata

  • Download URL: zvolv_sdk-0.0.36.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for zvolv_sdk-0.0.36.tar.gz
Algorithm Hash digest
SHA256 b52a03532ffc0bf26a80cd3f256f202c5ea7dcc9701634176070be50e48099d6
MD5 3b644d2a5f0263aa1c18cd9950f8fafd
BLAKE2b-256 0539d06ed8d1ef199074361934d6918cdf3728e3adb193d87b6daab26d09c2c5

See more details on using hashes here.

File details

Details for the file zvolv_sdk-0.0.36-py3-none-any.whl.

File metadata

  • Download URL: zvolv_sdk-0.0.36-py3-none-any.whl
  • Upload date:
  • Size: 27.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for zvolv_sdk-0.0.36-py3-none-any.whl
Algorithm Hash digest
SHA256 9adcd670041cc23037949051493f165bce1925a3e633fc848cb502adadbe51fc
MD5 5852a5e81fd8d3351e40c18d5e75a5d4
BLAKE2b-256 30dae1230bb9ce1e6a35bb7e4023d6e3e87a5e66ba5c17483d46ef57ed43ab8c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page