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.4+
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-1.1.0.tar.gz
(7.4 kB
view details)
Built Distribution
File details
Details for the file python-gyazo-1.1.0.tar.gz
.
File metadata
- Download URL: python-gyazo-1.1.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d18654963cd38c3b494ecb9607d031313b36a9ba6ff74fb780ebc041e65b5827 |
|
MD5 | 064fa6838adc3be5509ca4b49c966e40 |
|
BLAKE2b-256 | b0bba6ad6dfd9579d71bc5a5130066a4cb709c66d737e63ae24166c9d3dff959 |
Provenance
File details
Details for the file python_gyazo-1.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: python_gyazo-1.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23fed6337b3064ae808e4640bfdb7a5c39aeb959092312a51ee71c9b623fd0db |
|
MD5 | 0b4b06fa438f56021280833cbd0f3172 |
|
BLAKE2b-256 | 8ddf27bcfee665e1effe42de468d9130ea08f9c6c75436d7b5d5174065b88000 |