5 Şubat 2013 Salı

ticketevolution-python 0.1

To contact us Click HERE

ticketevolution-python TicketEvolution Python Library

ticketevolution-python is a Python wrapper around the TicketEvolution broker exchange API.

Installing

Using pip (recommended)

pip install ticketevolution

From source:

Download the latest ticketevolution-python library from:

http://github.com/ticketevolution/ticketevolution-python

Install the dependencies:

pip install -r requirements.txt

Untar the source distribution and run:

 python setup.py build
 python setup.py install


Testing

With setuptools installed:

 python setup.py test

Without setuptools installed:

 python ticketevolution_test.py

Using

Look at the method documentation in ticketevolution.py for a more indepth overview.

To create an API object with your credentials:

import ticketevolution
api = ticketevolution.Api(client_token = "abc",
 client_secret = "xyz")


To make a GET request:

result = api.get('/categories')
print [c['name'] for c in result['categories']]


To make a GET request with parameters:

result = api.get('/categories', parameters = {
 'per_page':5
 'page_num':1
})
print [c['name'] for c in result['categories']]


Making a POST request to create a new client

result = api.post('/clients', body = {
 "clients": [{
 "name":"Will Smith"
 }]
})



Product's homepage

Requirements:



· Python


Download ticketevolution-python 0.1 Free
Tags: TicketEvolution wrapper   , broker exchange   , Python library   , Python   , TicketEvolution   , wrapper   ,
python, python setuppy, setuppy, setuptools installed python, ticketevolution-python, c'name' c, installed python, create, make get, make, request, c'name', installed, setuptools, install, get, 'per_page'5, xyz, parametersresult, apiget'/categories', abc, client_secret, result'categories'to, requestresult, apiget'/categories'print

Hiç yorum yok:

Yorum Gönder