chesstrian / planyo-py

Python Client for Planyo API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Planyo

Python client for Planyo API

Description

Planyo API low level client. Provides a straightforward mapping from Python to Planyo REST endpoint.

Requisites

Python 2.7+ or 3

Install

pip install -e git+https://github.com/chesstrian/planyo-py.git#egg=planyo
# or, for private repos:
pip install -e git+git@github.com:chesstrian/planyo-py.git#egg=planyo

Usage

from planyo import Planyo

client = Planyo(api_key='ABC')
client.api_test()

The instance has all methods present in Planyo API Docs: https://api.planyo.com/api.php

It is highly recommended to checks docs for params received by any method. Just pass a dictionary in params with all desired arguments.

from planyo import Planyo

client = Planyo(api_key='ABC')
client.api_test(params=dict(language='IT'))

Hash key is also supported, in this case the instance needs to be initialized with the secret hash key from Planyo

from planyo import Planyo

client = Planyo(api_key='ABC', hash_key='DEF')
client.api_test()

Tests

python tests.py

About

Python Client for Planyo API

License:MIT License


Languages

Language:Python 100.0%