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.9.0.tar.gz (16.4 kB view details)

Uploaded Source

Built Distributions

python_gyazo-0.9.0-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

python_gyazo-0.9.0-py2-none-any.whl (18.3 kB view details)

Uploaded Python 2

File details

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

File metadata

File hashes

Hashes for python-gyazo-0.9.0.tar.gz
Algorithm Hash digest
SHA256 0e512178b76a0d886de1200b492528d0f373c7b95e7ba7455264ea8dbb681d5e
MD5 29882b71b0100f5927cdf518afd4848a
BLAKE2b-256 2b4f171161a17174b191e6c75b2cf2a965a66fa4943c22c8200196c2b2f2d267

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for python_gyazo-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b6f5bb88ade78da0703c3a6bb00760b94eb93ced53c3b22200a4e63175e3712
MD5 3fede57a2d78d8a697551f46fb0e6c3e
BLAKE2b-256 92f92683233f3aaae1426efeaea1d5d5ac01f7e499bb3c662558103f2c78cc8a

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for python_gyazo-0.9.0-py2-none-any.whl
Algorithm Hash digest
SHA256 53714155f6359afa24929835bd594caa9bdb31ccad29072ff82d30d021041e20
MD5 7926b0cd2d8a3a053feb287b1fc5d7fa
BLAKE2b-256 99d1414c58226e8cac954c71901a8d6bc1ac9cc4da082279cb7c34c8cbf90b0f

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