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.0.0.tar.gz
(7.0 kB
view details)
Built Distribution
File details
Details for the file python-gyazo-2.0.0.tar.gz
.
File metadata
- Download URL: python-gyazo-2.0.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cc6dc4f5242285cb242bbe964d4c2925a9f8ea2616d2d16fd332e7147dac3b0 |
|
MD5 | 652d52ee28a2318c954d66a33eadf2ea |
|
BLAKE2b-256 | a71b2c97d12000c3fb978d7ba823c2783ec8cd2bdf4662fc284eb9ddd5659bdc |
Provenance
File details
Details for the file python_gyazo-2.0.0-py2.py3-none-any.whl
.
File metadata
- Download URL: python_gyazo-2.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57912e49fc828fd2c58b16ffe070745da3b2fd5428281001a6cc01aebe522462 |
|
MD5 | 4d744d45fe2f5d76a92250a2c50a73a2 |
|
BLAKE2b-256 | 795bbd8b18a45bae2c3248c47f7e742c8a82cf136979ddb9401c771daa3dde4e |