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
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
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.14.0.tar.gz
(6.1 kB
view hashes)
Built Distributions
Close
Hashes for python_gyazo-0.14.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e3bd90fa01afe5b923e94d79a36476a5fd51dabc817d6f915f396b961cec2ff |
|
MD5 | baf28bb787ff8da7bdf2effe58001dd8 |
|
BLAKE2b-256 | 1fd37f8b24aa3c46776bd301bf3c26e11e44acb01acce3e31fa0619529373e36 |
Close
Hashes for python_gyazo-0.14.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba20d51999b66e45d84e0cfe63eb026aab6cfcc2aa90c307de27d804f97d3938 |
|
MD5 | 14db1325cd22b553541ed78b875fd3c1 |
|
BLAKE2b-256 | 54c211eaba223627fe71755875bd38ec633a7c63763983ba5210c1c4fc183687 |