Python API Client & Examples for Close.io
Python
Clone or download
Pull request Compare This branch is 46 commits behind closeio:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
closeio_api
scripts
.gitignore
.gitmodules
README.md
requirements.txt
setup.py

README.md

Close.io API

A convenient Python wrapper for the Close.io API.

See the developer docs at http://developer.close.io. For any questions or issues, please contact support(at)close(dot)io.

Sample Usage

from closeio_api import Client
import urllib

api = Client('YOUR_API_KEY')

# post a lead
lead = api.post('lead', data={'name': 'New Lead'})

# get 5 most recently updated opportunities
opportunities = api.get('opportunity', data={'_order_by': '-date_updated', '_limit': 5})

# fetch multiple leads (using search syntax)
lead_results = api.get('lead', data={
    '_limit': 10,
    '_fields': 'id,display_name,status_label',
    'query': 'custom.my_custom_field:"some_value" status:"Potential" sort:updated'
})

Check out scripts/ for more detailed examples.

Running a script

$ git clone https://github.com/closeio/closeio-api.git
$ cd closeio-api
$ virtualenv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ python script/merge_leads.py -k MYAPIKEY 
...

Other Languages

Thanks to our awesome users, other languages are supported, too: