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.9.0.tar.gz
(16.4 kB
view details)
Built Distributions
File details
Details for the file python-gyazo-0.9.0.tar.gz
.
File metadata
- Download URL: python-gyazo-0.9.0.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e512178b76a0d886de1200b492528d0f373c7b95e7ba7455264ea8dbb681d5e |
|
MD5 | 29882b71b0100f5927cdf518afd4848a |
|
BLAKE2b-256 | 2b4f171161a17174b191e6c75b2cf2a965a66fa4943c22c8200196c2b2f2d267 |
Provenance
File details
Details for the file python_gyazo-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: python_gyazo-0.9.0-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b6f5bb88ade78da0703c3a6bb00760b94eb93ced53c3b22200a4e63175e3712 |
|
MD5 | 3fede57a2d78d8a697551f46fb0e6c3e |
|
BLAKE2b-256 | 92f92683233f3aaae1426efeaea1d5d5ac01f7e499bb3c662558103f2c78cc8a |
Provenance
File details
Details for the file python_gyazo-0.9.0-py2-none-any.whl
.
File metadata
- Download URL: python_gyazo-0.9.0-py2-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53714155f6359afa24929835bd594caa9bdb31ccad29072ff82d30d021041e20 |
|
MD5 | 7926b0cd2d8a3a053feb287b1fc5d7fa |
|
BLAKE2b-256 | 99d1414c58226e8cac954c71901a8d6bc1ac9cc4da082279cb7c34c8cbf90b0f |