Skip to content
Python API binding for Ge.tt
Python Makefile
Latest commit 1e21f86 Oct 1, 2015 @mrallen1 Merge pull request #1 from v1k45/master
Fixed python3 import compability issues.
Failed to load latest commit information.
pygett Fixed Python3 import compability issues. Oct 1, 2015
LICENSE Initial commit Dec 6, 2011
MANIFEST.in disttools and pep8 updates Dec 13, 2011
README.md Add link to RTFD Dec 13, 2011
setup.py Add link to RTFD Dec 13, 2011

README.md

pyGett

About

This library provides a binding to the REST API for the file sharing service Ge.tt. Please see the Ge.tt Developer's Documentation for information on how to get an API key.

Installation

To install, use the standard python setup.py install or sudo pip install pygett

Documentation

Read the full documentation on ReadTheDocs.

Quick Usage

The API initializaton requires the following parameters to be present:

  • apikey: The API key assigned by Ge.tt for your application
  • email: The email address linked to an API key
  • password: The password linked to an API key

Example initialization:

from pygett import Gett

client = Gett(
        apikey = "apitest",
        email = "apitest@ge.tt",
        password = "secret"
)

Getting a dict of all shares:

shares = client.get_shares()
for file in shares['4ddfds'].files
    print file.filename

Getting a list of all shares:

shares = client.get_shares_list()
for share in shares:
    for file in share.files:
        print share.sharename + "\t" + file.filename + "\t" + file.size

Getting a specific share:

share = client.get_share("4ddfds")

Getting a specific file:

file = client.get_file("4ddfds", 0)

Uploading a file:

file = client.upload_file(
        filename = "test.rst",
        data = open("test.rst", "rb").read()
)

    print "File '%s' is now available at %s" % (file.filename, file.getturl)

Downloading file content:

file = client.get_file("4ddfds", 0)
open("myCopy.txt", "wb").write(file.contents())

License

Copyright (C) 2011 by Mark Allen. You may use this library under the terms and conditions of the MIT license. See the LICENSE file for full information.

Something went wrong with that request. Please try again.