Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tugboat API Client
Python Shell
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
documentation
tugboatyards
.gitignore
LICENSE
README.md
requirements.txt
setup.py
test_lib.py
tugboat_test.py

README.md

pytugboat

A client library for accessing Tugboat Yards’ API

Installation

$ git clone git@github.com:tugboat-yards/pytugboat.git
$ cd pytugboat
$ pip install requests
$ python setup.py install

Documentation

http://pytugboat.readthedocs.org/

Example

>>> import pprint
>>> from tugboatyards import Tugboat
>>> t = Tugboat("XXXXXXX%YYYYYYYYYYYYY")
>>> pprint.pprint(t.GetPage().__dict__)
{'offers': [<tugboatyards.Offer object at 0x108bb9ed0>,
            <tugboatyards.Offer object at 0x1088c8b50>,
            <tugboatyards.Offer object at 0x108e18a50>],
 'page_id': 212385}
>>> pprint.pprint(t.GetPage().offers[0].__dict__)
{
    'amount': u'10.00',
    'desc': u'This offer will make you an official supporter and you\u2019ll get access to some Tugboat features we\u2019re still working on at the moment.',
    'is_recurring': False,
    'offer_id': 301238,
    'offer_name': u'givesupport',
    'offer_type': None,
    'page_id': 212385,
    'status': u'active',
    'title': u'Give Support',
    'user_id': 312481
}
Something went wrong with that request. Please try again.