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.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.
For more details, please see this page.
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.8.0.tar.gz
(16.3 kB
view hashes)
Built Distributions
Close
Hashes for python_gyazo-0.8.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29010dbf86c7a3bb37b387e97579de91ff86c807ea94845791fc88c9356a7d90 |
|
MD5 | b03ebbf8943dd7b38b65716647acfeec |
|
BLAKE2b-256 | e9138ee02c9d054817c43544991084da9d03c328ad7a0fc69c1943ae754d07c0 |
Close
Hashes for python_gyazo-0.8.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec18d54b8eeb81a7fb218acf468d87a5e24074963a33a786a71bac3c18874ae9 |
|
MD5 | a47e2050a64793a66edd7cb16a5c4342 |
|
BLAKE2b-256 | 6468a078d0c71b2b02520adca035d3bcb6e40c087e7bb403cc92dffe59e41ab3 |