Skip to main content

A Python wrapper for Gyazo API

Project description

PyPI version PyPI Python versions Build Status Documentation Status Code Climate Coverage Status

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


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.2.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

python_gyazo-1.2.0-py2.py3-none-any.whl (9.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file python-gyazo-1.2.0.tar.gz.

File metadata

  • Download URL: python-gyazo-1.2.0.tar.gz
  • Upload date:
  • Size: 8.3 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

Hashes for python-gyazo-1.2.0.tar.gz
Algorithm Hash digest
SHA256 43b16cd95054d605bd6c6f53179d8a8a67d9ba3244eb417247faa4408fedb6ad
MD5 ecc3c894bf7d9b7a1c533e5690071861
BLAKE2b-256 9890bb95bdacffb2a914d3a8337b618377d51ec48058b74c9d319bbcd6077c20

See more details on using hashes here.

Provenance

File details

Details for the file python_gyazo-1.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: python_gyazo-1.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.5 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

Hashes for python_gyazo-1.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ddaf2baa1ca17b0495ac679223ef7f6a3eb1bd9bb5f9ae3884b98f73692cc581
MD5 d187f354d8a21843518450f837ee9dbe
BLAKE2b-256 b12c240d72f7ab8292e80f14653d981a06fbfad04d88a5d7f2b22fe62b037577

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page