Zoho CRM connector
Project description
Zoho CRM Connector
Zoho provides a Python SDK, but I found it a bit hard to use and it seems a bit complicated. For instance, there is a dependency on mysql. This module is a little more pragmatic (it uses retries) and it returns pages of results with yield.
This is basically what I consider a pragmatic library for my own purposes, so it has specific functions for doing things like creating quotes. This code is based on code I have in production, where it is used to synchronise accounts, contacts and quotes with an ERP.
Install
pip install zoho_crm_connector
Authenticating with Zoho CRM
You need three things:
refresh token
client ID
client secret
These instructions are from the documentation from Zoho for the Python SDK
Step 1: Registering a Zoho Client
Since Zoho CRM APIs are authenticated with OAuth2 standards, you should register your client app with Zoho. To register your app:
Visit this page https://accounts.zoho.com/developerconsole. Click on “Add Client ID”. Enter Client Name, Client Domain and Redirect URI. Select the Client Type as “Web based”. Click “Create” Your Client app would have been created and displayed by now. The newly registered app’s Client ID and Client Secret can be found by clicking Options → Edit. (Options is the three dot icon at the right corner).
Note for Sandbox:
You can pass the sandbox url as the base url:
zoho_crm = Zoho_crm(refresh_token=zoho_keys['refresh_token'], client_id=zoho_keys['client_id'], client_secret=zoho_keys['client_secret'], base_url='https://crmsandbox.zoho.com/crm/v2/', token_file_dir=tmp_path_factory.mktemp('zohocrm'))
Please note: Make a separate client ID for your sandbox testing. Even though the process of getting a grant token and then a refresh token is exactly the same, it seems to need a distinct client ID via the developer console.
Usage
See test_zoho_crm_connector.py in tests for some examples.
Testing
pytest needs to be installed.
Warning: testing writes an access token to a temporary directory provided by pytest, on linux this is a subdirectory of /tmp. testing needs a connection to zoho. Set three environment variables:
refresh_token': os.getenv('ZOHOCRM_REFRESH_TOKEN'), client_id': os.getenv('ZOHOCRM_CLIENT_ID'), client_secret': os.getenv('ZOHOCRM_CLIENT_SECRET')
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
File details
Details for the file zoho_crm_connector-0.2.0.tar.gz
.
File metadata
- Download URL: zoho_crm_connector-0.2.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e024312d7ea77b7d328ec1d9855d66e48dc91c2d8d6622e36f21c47521e93c78 |
|
MD5 | 0511035a901962ed71e6a6451692fafa |
|
BLAKE2b-256 | 9721bf638204cc610b04b08992c12adb779ea4847fbf22abd6c36490ceb5ae5e |
File details
Details for the file zoho_crm_connector-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: zoho_crm_connector-0.2.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2f2b7b3199fd4efc3c774e454090e460553df5da3d107cc72490ce9e595b629 |
|
MD5 | 48ea4023f1de94e6131bfa64ff1f2bfa |
|
BLAKE2b-256 | c42ee9dce5c38e654e7002b41ebe6253d0ee7c11e58f1fe71b928fd53930e18a |