Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 767 Bytes

README.rst

File metadata and controls

39 lines (23 loc) · 767 Bytes

putio.py

Simple wrapper for Put.io API v2.

Installing

putio.py is available on PyPI.

$ pip install putio.py

Usage

import putiopy

helper = putiopy.AuthHelper(CLIENT_ID, CLIENT_SECRET, \
                            CALLBACK_URL, type='token')

# this will open a browser to authetication url
# after authenticating you will find the oauth_token in the address bar
helper.open_authentication_url()

client = putiopy.Client(OAUTH_TOKEN)

# list files
files = client.File.list()

# add a new transfer
transfer = client.Transfer.add_url('http://example.com/good.torrent')

# read the code for other methods.