Skip to main content

A Python wrapper for Gyazo API

Project description

PyPI version Downloads Build Status Documentation Status Code Climate Coverage Status

A Python wrapper for Gyazo API.

The full-documentation is available on Read the Docs.

Requirements

  • Python 2.7+

  • Python 3.2+

  • PyPy

  • PyPy3

Installation

pip install python-gyazo

Usage

At first, you must create an application and get an access token from https://gyazo.com/oauth/applications

from __future__ import print_function

from gyazo import Api


api = Api(access_token='YOUR_ACCESS_TOKEN')

### Get a list of images
images = api.get_image_list()
for image in images:
    print(str(image))

### Using an image model
image = images[0]
print("Image ID: " + image.image_id)
print("URL: " + image.url)

### Download an image
if image.url:
    with open(image.filename, 'wb') as f:
        f.write(image.download())

### Upload an image
with open('sample.png', 'rb') as f:
    image = api.upload_image(f)
    print(image.to_json())

### Delete an image
api.delete_image('IMAGE_ID')

### oEmbed
image = images[0]
print(api.get_oembed(image.permalink_url))

Backup

python-gyazo includes a utility program called gyazo-backup. You can download all images from Gyazo with this command.

docs/source/images/backup_example.jpg

For more details, please see this page.

License

MIT License. Please see LICENSE.

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

python-gyazo-0.10.1.tar.gz (16.7 kB view details)

Uploaded Source

Built Distributions

python_gyazo-0.10.1-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

python_gyazo-0.10.1-py2-none-any.whl (18.8 kB view details)

Uploaded Python 2

File details

Details for the file python-gyazo-0.10.1.tar.gz.

File metadata

File hashes

Hashes for python-gyazo-0.10.1.tar.gz
Algorithm Hash digest
SHA256 ee0cfd437df38daedc29ebd130725b1cf2b0a714384d210f7596a0ac4d5df50b
MD5 435dedb61fcb45a75766cdaa454368e1
BLAKE2b-256 39d1b88e495cb06b4f217682958b69476e8255d9f7bb716ef83f02a79ebe9af4

See more details on using hashes here.

Provenance

File details

Details for the file python_gyazo-0.10.1-py3-none-any.whl.

File metadata

File hashes

Hashes for python_gyazo-0.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3e061f2b39db77b8862376ccc3e00b4c6b201e4c0bf1b9008c24e60725174e70
MD5 9cbf360d47f88b0c4473e790bea31196
BLAKE2b-256 d37333047cab017b17d6fbd38c4cea9833ed238b36cd32fe65ee131a7dffa367

See more details on using hashes here.

Provenance

File details

Details for the file python_gyazo-0.10.1-py2-none-any.whl.

File metadata

File hashes

Hashes for python_gyazo-0.10.1-py2-none-any.whl
Algorithm Hash digest
SHA256 0dd14cdc39ee3cdecca77140928faf8ab2aae30690feec42532654d51dccd415
MD5 dafec66849ca615de8d1fed5ca8eb067
BLAKE2b-256 9b5bb4c64844c6263e5696799c64e02c00c4a54eb292e5f4416f3bb5c1578b68

See more details on using hashes here.

Provenance

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