Skip to main content

Python wrapper for Gist

Project description

Python wrapper for GitHub's Gist API.

Latest Version Downloads

Features

  • Create Gists and get url, script and clone link on success (can be used for copy-paste purpose too)

  • View one’s Gist(s) - name, description and it’s content

  • Edit and Delete a gist

  • Search Gist(s) of any user; fork, star and unstar them

  • List all comments on any Gist, put/edit/delete a comment on a Gist

Installation

$ pip install simplegist

Download here and run python setup.py install after changing directory to /simplegist

Generating Github API Access Token

Go to Github’s Account settings > Applications Create a new token and use it for making API requests instead of password

Example Usage

from simplegist import Simplegist

ghGist = Simplegist(username='USERNAME', api_token='API_TOKEN')
# or provide USERNAME and API_TOKEN in config.py file, so just, ghGist = Gist()

# creating gist and getting url, script and clone link
ghGist.create(name='_GISTNAME', description='_ANY_DESCRIPTION', public=1, content='_CONTENT_GOES_HERE')

# List down all the names of authenticated user's Gists
ghGist.profile().listall()

# List down only the names of recent two Gists of user '_USERNAME'
ghGist.search('_USERNAME').list(2)

# List down all the comments on gist named '_GISTNAME' of user 'USERNAME'
ghGist.comments().listall(user='_USERNAME', name='_GISTNAME')

# ...and many more...

Full Usage and Documentation

Visit here READTHEDOCS or PYTHONHOSTED

Patches and suggestions are welcome

$ git clone https://github.com/softvar/simplegist.git
$ cd simplegist

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simplegist-1.0.1.tar.gz (6.0 kB view details)

Uploaded Source

File details

Details for the file simplegist-1.0.1.tar.gz.

File metadata

  • Download URL: simplegist-1.0.1.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for simplegist-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8405c25a685ddf8cdac172cde8d2314d76dda8a43575e44d371fb32ac26d7d4d
MD5 f5531a402369684c9fadc6a2e8a0c37a
BLAKE2b-256 981ee8ab93cac241c415bf12910894f23cda86d0b5399001ee53f56a0735910b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page