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.10.1.tar.gz
(16.7 kB
view details)
Built Distributions
File details
Details for the file python-gyazo-0.10.1.tar.gz
.
File metadata
- Download URL: python-gyazo-0.10.1.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee0cfd437df38daedc29ebd130725b1cf2b0a714384d210f7596a0ac4d5df50b |
|
MD5 | 435dedb61fcb45a75766cdaa454368e1 |
|
BLAKE2b-256 | 39d1b88e495cb06b4f217682958b69476e8255d9f7bb716ef83f02a79ebe9af4 |
Provenance
File details
Details for the file python_gyazo-0.10.1-py3-none-any.whl
.
File metadata
- Download URL: python_gyazo-0.10.1-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e061f2b39db77b8862376ccc3e00b4c6b201e4c0bf1b9008c24e60725174e70 |
|
MD5 | 9cbf360d47f88b0c4473e790bea31196 |
|
BLAKE2b-256 | d37333047cab017b17d6fbd38c4cea9833ed238b36cd32fe65ee131a7dffa367 |
Provenance
File details
Details for the file python_gyazo-0.10.1-py2-none-any.whl
.
File metadata
- Download URL: python_gyazo-0.10.1-py2-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0dd14cdc39ee3cdecca77140928faf8ab2aae30690feec42532654d51dccd415 |
|
MD5 | dafec66849ca615de8d1fed5ca8eb067 |
|
BLAKE2b-256 | 9b5bb4c64844c6263e5696799c64e02c00c4a54eb292e5f4416f3bb5c1578b68 |