Skip to main content

A Python wrapper for Gyazo API

Project description

PyPI version Downloads Build 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.8.0.tar.gz (16.3 kB view details)

Uploaded Source

Built Distributions

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

Uploaded Python 3

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

Uploaded Python 2

File details

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

File metadata

File hashes

Hashes for python-gyazo-0.8.0.tar.gz
Algorithm Hash digest
SHA256 2932552a3f913f71833acfbbff131ceab9d9b9f99c3ac8f8484f70885234bce1
MD5 bf04e62ef7201443fe1c11ffdc91eb3e
BLAKE2b-256 029e3385d728f5d15633cc93b6446ffa8b35b19708cee4a88dbbbd89787a69b6

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for python_gyazo-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29010dbf86c7a3bb37b387e97579de91ff86c807ea94845791fc88c9356a7d90
MD5 b03ebbf8943dd7b38b65716647acfeec
BLAKE2b-256 e9138ee02c9d054817c43544991084da9d03c328ad7a0fc69c1943ae754d07c0

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for python_gyazo-0.8.0-py2-none-any.whl
Algorithm Hash digest
SHA256 ec18d54b8eeb81a7fb218acf468d87a5e24074963a33a786a71bac3c18874ae9
MD5 a47e2050a64793a66edd7cb16a5c4342
BLAKE2b-256 6468a078d0c71b2b02520adca035d3bcb6e40c087e7bb403cc92dffe59e41ab3

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