Skip to main content

sellsy_api is a tiny client for Sellsy API

Project description

# sellsy-api
> A tiny client to manage your Sellsy plateform using Python

sellsy-api is a client for the official [Sellsy API]( in order to allow you to get and manipulate data from [Sellsy plateform]( The official client was written in PHP, here is a client written in pure python.

### Features
- Allows you to connect with your Oauth private API keys
- Access to all methods listed [here]( with only a single function
- Error handler

### Requirements
* [Python 2/3](,
* A Python Package Manager ([pip](, [pipenv](, [conda](, ..)

## Installing

If you are using pip as PM:

# Connect to your virtualenv
$ workon projectenv

# Use pip to install the package
$ pip install sellsy_api

Or if you are using pipenv (pip needs to be installed too):

$ cd /path/to/my/project
$ pipenv install sellsy_api

Verify now if the package as been successfully installed
$ python
>> import sellsy_api # Should not raise exception

## Quick Start

import os
import sellsy_api

client = sellsy_api.Client(

infos = client.api(method='Infos.getInfos')
prospect = client.api(method='Prospects.getOne', params={ 'id': 55 })
except sellsy_api.SellsyAuthenticateError as e: # raised if credential keys are not valid
print('Authentication failed ! Details : {}'.format(e))
except sellsy_api.SellsyError as e: # raised if an error is returned by Sellsy API (

prospect_name = prospect['corporation']['name']


You can access the full Sellsy API [methods]( using `client.api(method='', params={})`.

The function returns a dictionary containing the response:
"name":"New Prospect",
"created":"2013-01-31 14:49:35",
"updated":"2013-01-31 16:41:38"

For now, two exceptions could be raised by calling the function:
- `SellsyAuthenticateError` : if one of `consumer_key`, `consumer_secret`, `user_token` or `user_secret` is invalid or if authentication failed
- `SellsyError`: Sellsy API could return error depends on unexcistant ressource or method not valid for example. So this exception is raised and you can access the exception infos to have more details or error : `{code} - {detail}` where `code` if one of code error described [here]( (in Error Process tab).
- _COMING SOON_: more exceptions to catch precise errors through distinct exceptions (example: SellsyRessourceNotFound if the ressource you asked for does not exists) and not only through a unique `SellsyError` with different messages...

## Links

- [Sellsy plateform](
- [Sellsy API](
- [sellsy-api issue tracker](

## License

- **MIT** :

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

sellsy_api-0.0.2.tar.gz (8.1 kB view hashes)

Uploaded source

Built Distribution

sellsy_api-0.0.2-py2.py3-none-any.whl (5.6 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page