Skip to main content

A Python wrapper for Gyazo API

Project description

PyPI version PyPI Python versions CI Status Documentation Status

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


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

Uploaded Source

Built Distribution

python_gyazo-2.1.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python-gyazo-2.1.0.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for python-gyazo-2.1.0.tar.gz
Algorithm Hash digest
SHA256 6c611a3be5e9c856fae5e36caa55af43db522eaffe6ef1205ad86a8d504fe437
MD5 27c2f599a7fe7548eb7bac863939365d
BLAKE2b-256 d49a1ace99b4b33f0d501d9cf574d56505689a66262eee260d23a0d1eeb9a0f3

See more details on using hashes here.

Provenance

File details

Details for the file python_gyazo-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: python_gyazo-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for python_gyazo-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe9ab0d4ec4c77e790ee7db5e9253b67a3d1a2b186bdf25570042f8db856999d
MD5 3047ecef087d6e26de7ad94c7b2b67c4
BLAKE2b-256 d8572c9ca7b0edfcfe03463f80883d71779943014781fb095b9ff0efd5328e7c

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