Skip to main content

A Python wrapper for Gyazo API

Project description

PyPI version PyPI Python versions 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.4+

  • PyPy

  • PyPy3

Installation

pip install python-gyazo

Note: Please use the latest version of setuptools & pip

pip install -U setuptools pip

Usage

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

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

gyazo-backup is moved to python-gyazo-backup.

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

Uploaded Source

Built Distribution

python_gyazo-0.15.1-py2.py3-none-any.whl (10.6 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for python-gyazo-0.15.1.tar.gz
Algorithm Hash digest
SHA256 ec44efcc9ab72d35115b577d037b1cb0fd8074b37335d1e16f7441ddfbb2a9f8
MD5 54eb670799bdeaf1478e563250461429
BLAKE2b-256 75b4ba98a03c63c54e32336ac1e2b74a04267aac0a2c4dd36fb3e818967fceb1

See more details on using hashes here.

Provenance

File details

Details for the file python_gyazo-0.15.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for python_gyazo-0.15.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6f19ae3219b81accd20237e9262abe32448f2cf8f4d85d34ebaa4faee53d5d08
MD5 54201545e5f087d24333568328dd2973
BLAKE2b-256 29d1408469bf2daabe3cfb3780b6f13b12508e69eed071575eca23707f3fb8d8

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