Skip to main content

Zoho API integration for Python

Project description

Introduction

mfabrik.zoho package provides Python classes for making easy Zoho API calls. They allow you to integrate Zoho web application data into your Python software.

Features

  • Creating Zoho API session a.k.a ticket

  • Extendable API using a base class architecture

  • Logging all incoming and outgoing API traffic with Zoho

  • Support Python 2.4, 2.5 and 2.6 (2.4 needs additional lxml and simplejson libraries installed)

  • Compatible with non-ASCII or Unicode letters

  • Unit tests to guarantee the high quality of the code

mfabrik.zoho is intended to use for machine-to-machine communication and will work with any web framework, like Plone, Django, Google App Engine.

To communicate with Zoho you need username, password and API KEY. For further information, see Setup > Admin > Developer key in your Zoho application.

API support

Currently out of box support includes:

  • CRM apis: insert_records, get_records, delete_lead

You can easily wrap Zoho API calls you need using this library. Please contribute patches to the package.

Installation

To install mfabrik.zoho to your system-wide Python do as below.

Example (UNIX):

sudo easy_install mfabrik.zoho

Example (UNIX, Python 2.4):

sudo easy_install mfabrik.zoho lxml simplejson

Usage

To learn how to use this library, it is best to study its unit test source code (tests.py).

Example usage:

# Import CRM connector class
from mfabrik.zoho.crm import CRM
from mfabrik.zoho.core import ZohoException

# Initialize Zoho CRM API connection
# You need valid Zoho credentials and API key for this.
# You get necessary data from Zoho > Setup > Admin > Developer key
crm = CRM(username="myusername", password="foobar", apikey="12312312312312312323")

# Open connection can be used to make as many as possible API calls
# This will raise ZohoException if credentials are incorrect.
# Also IOError or URLError will be raised if you the connection to Zoho servers
# does not work.
crm.open()

# Lead is just a bunch of dictionaried data
# For possible lead parameters see crm.py.

lead = {
    u"First Name" : u"Mikko",
    u"Last Name" : u"Ohtamaa",
    u"Company" : u"mFabrik Research Oy"
}

# Insert a new lead to Zoho CRM lead database.
# We support multiple leads per call, so we need to listify our one lead first.
crm.insert_records([lead]) # This will raise ZohoException if lead data is invalid

Logging

Python logging module logger Zoho API is used to output API traffic on DEBUG log level.

Source code

Commercial development

This package is licensed under open source GPL license. If you wish to use this code in a commercial product, relicense it or you are looking for high quality Zoho/Python support, please contact mFabrik Research. Our top class Python developers are ready to help you with your software development.

Further reading

Author

mFabrik Research Oy - Python and Plone professionals for hire.

Changelog

1.0

  • Initial release

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

mfabrik.zoho-1.0.tar.gz (8.3 kB view details)

Uploaded Source

File details

Details for the file mfabrik.zoho-1.0.tar.gz.

File metadata

  • Download URL: mfabrik.zoho-1.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mfabrik.zoho-1.0.tar.gz
Algorithm Hash digest
SHA256 50164a74be3169f2dd8aeb10f82c1e3a3c07b88a301aef220e9ba368e26bcf0b
MD5 576f753f65c84b69f6873c33897d4ad4
BLAKE2b-256 227e18638800a69583795bda10c43b5df96dc0dee31ba19ea294bd1323dff014

See more details on using hashes here.

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