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 3.5+
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
client = Api(access_token='YOUR_ACCESS_TOKEN')
### Get a list of images
images = client.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 = client.upload_image(f)
print(image.to_json())
### Delete an image
client.delete_image('IMAGE_ID')
### oEmbed
image = images[0]
print(client.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-2.2.0.tar.gz
(8.2 kB
view hashes)
Built Distribution
Close
Hashes for python_gyazo-2.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b89ef69ca6d6b63d54154f47c7ea707d886625af932e1bf0f5f37fb38b6bfac |
|
MD5 | c826d970ef14169cade7789add7352f2 |
|
BLAKE2b-256 | a334fc04d27fa7f40b7fdc7ddc46f52622e1a3851e61ce6e51616fdff7529655 |