Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

EmilStenstrom/python-nutshell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-nutshell

A minimal python library to access Nutshell CRM:s JSON-RPC API.

Build Status PyPi version PyPi downloads

Installation

pip install nutshell

Example of usage

First create a Nutshell APIKEY. Then use the e-mail address of one of your existing nutshell users as the USERNAME (Note that nutshell allows one user to have multiple e-mail addresses; the API requires that you use the primary one).

from nutshell import NutshellAPI

USERNAME = "[email protected]"
APIKEY = "000000000000000000000000000000000000000000000"

api = NutshellAPI(USERNAME, APIKEY)
accounts = api.findAccounts()
for account in accounts:
    print("-" * 80)
    print("Account:")
    for field, value in account.items():
        print("%30s: %s" % (field, value))

The api object converts all method calls on it to JSON-RPC calls against Nutshell's API. The API documentation has a list possible calls, including parameters.

Run the tests

python setup.py test