Skip to main content

A Python wrapper for Gyazo API

Project description

PyPI version 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.3+

  • 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 __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

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

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

python_gyazo-0.13.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

python_gyazo-0.13.0-py2-none-any.whl (8.9 kB view details)

Uploaded Python 2

File details

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

File metadata

  • Download URL: python-gyazo-0.13.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for python-gyazo-0.13.0.tar.gz
Algorithm Hash digest
SHA256 1fb66076cad5f517a45741f924a12abf3d3cd027d8395fe8ea4bf48945868e98
MD5 233152df2fbd1d09929c5ed60d8b0b7c
BLAKE2b-256 a1c85d34a006cc5cc906665d71dcbe0e951b0bdbecaf2c2d12b439401989bf73

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_gyazo-0.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 beb07d2674b139df68e8b4e34818339761cde8725afbd96a1222d9bee4645328
MD5 a2ca0840450c8a4deb03ed3484780daa
BLAKE2b-256 7f8d38973da68bd9bd7b42ff3a50be6f282df87b3a1d8c73a69bcc1c2d8bbbab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_gyazo-0.13.0-py2-none-any.whl
Algorithm Hash digest
SHA256 19212b30b028cdd2ce5408f00f09d5f750d6f8593c1b10392f25b9e5825038db
MD5 0a6a445fed214fd5353beee1216776d0
BLAKE2b-256 31b8bc3ae14d7a66906057e705085759e569ce5e96e6a0ce4f9b369294eb4153

See more details on using hashes here.

Supported by

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