A Python wrapper for Gyazo API
Project description
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
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
Release history Release notifications | RSS feed
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.12.0.tar.gz
(5.7 kB
view hashes)
Built Distributions
Close
Hashes for python_gyazo-0.12.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43a1eb13ef9f9414cc77e1b15607f17d39d4e095da6a0563d82a6b8ed5c6697f |
|
MD5 | 07a831a85c82a849941fd6431f6714e2 |
|
BLAKE2b-256 | 67a3ac259d37b05675385ae25a7f2816c7a18cea3527c8b8e7f7ed3875730ec5 |
Close
Hashes for python_gyazo-0.12.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b728b58a431fae6790e2f9dad5ef265c39e86f2c7d9dd9a6f57b4a289c7a325 |
|
MD5 | f6406d4959e400509a8d11d52a18bc90 |
|
BLAKE2b-256 | 83be888df9dbdcffcdac9080c67e08b937efaa7d7bc43daae6249fb2a402a000 |