Skip to main content
Help us improve Python packaging – donate today!

API Client for

Project Description

Python client for API

Build Status Coverals

Docs are available at Pull requests with documentation enhancements and/or fixes are awesome and most welcome.


  • python >= 2.6


sailplay could be installed using pip:

pip install sailplay


Initialize API client

You should have pin, store_department_id and store_department_key from the service.

from sailplay import SailPlayClient

client = SailPlayClient(pin, store_department_id, store_department_key)

Additional params

client = SailPlayClient(
    pin, store_department_id, store_department_key,
    token="token-here", # Set token manually (default "")
    silence=True,       # Dont fail on API errors (default False)
    loglevel="debug",   # Set log level (default INFO)

Get API token


Not required. Client will get token automatically on API requests.

print client.token

Working with api

Sailplay have nice and easy syntax. Just have a look:

# Get events list

# Create a new user
client.api.users.add(user_phone='...', first_name='...', last_name='...')

# Get info about user'...')

# Create purchase**params)

# You also could use getitem syntax for params
# Same as

# And etc. I hope you make decision how the client works :)

For now client chooses API version automaticaly.

Context manager

You could redefine the client settings in context:

with client.ctx(silence=True):
    # Errors will not be raised here
    client.api.users.add(user_phone='...', first_name='...', last_name='...')

Raw api request

You could make raw request to sailplay API:

client.request(method='GET', url='/users/info', data={...})

Have a nice codding!

Bug tracker

If you have any suggestions, bug reports or annoyances please report them to the issue tracker at


Development of starter happens at github:


  • klen (Kirill Klenov)


Licensed under a BSD license.

Release history Release notifications

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
sailplay-0.2.0-py2.py3-none-any.whl (6.4 kB) Copy SHA256 hash SHA256 Wheel 2.7 Aug 1, 2014
sailplay-0.2.0.tar.gz (5.5 kB) Copy SHA256 hash SHA256 Source None Aug 1, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page