Metadata-Version: 2.0
Name: python-gyazo
Version: 0.15.0
Summary: A Python wrapper for Gyazo API
Home-page: https://github.com/ymyzk/python-gyazo
Author: Yusuke Miyazaki
Author-email: miyazaki.dev@gmail.com
License: MIT
Description-Content-Type: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, <4
Requires-Dist: python-dateutil (>=2.4.2)
Requires-Dist: requests (>=2.7.0)
Requires-Dist: typing; python_version < "3.5"
Provides-Extra: docs
Requires-Dist: Sphinx (<1.7,>=1.6); extra == 'docs'
Requires-Dist: sphinx-rtd-theme (<0.3,>=0.2.4); extra == 'docs'
Provides-Extra: mypy
Requires-Dist: mypy; python_version >= "3.4" and extra == 'mypy'
Provides-Extra: test
Requires-Dist: coverage (<5.0.0,>=4.3.4); extra == 'test'
Requires-Dist: coveralls (<2.0,>=1.1); extra == 'test'
Requires-Dist: flake8 (<4.0.0,>=3.3.0); extra == 'test'
Provides-Extra: test
Requires-Dist: mock (<3.0.0,>=2.0.0); python_version < "3.3" and extra == 'test'

python-gyazo
============
.. image:: https://badge.fury.io/py/python-gyazo.svg
   :target: https://pypi.python.org/pypi/python-gyazo/
   :alt: PyPI version
.. image:: https://img.shields.io/pypi/pyversions/python-gyazo.svg
   :target: https://pypi.python.org/pypi/python-gyazo/
   :alt: PyPI Python versions
.. image:: https://travis-ci.org/ymyzk/python-gyazo.svg?branch=master
   :target: https://travis-ci.org/ymyzk/python-gyazo
   :alt: Build Status
.. image:: https://readthedocs.org/projects/python-gyazo/badge/?version=latest
   :target: https://python-gyazo.readthedocs.io/
   :alt: Documentation Status
.. image:: https://codeclimate.com/github/ymyzk/python-gyazo/badges/gpa.svg
   :target: https://codeclimate.com/github/ymyzk/python-gyazo
   :alt: Code Climate
.. image:: https://coveralls.io/repos/ymyzk/python-gyazo/badge.svg?branch=master
   :target: https://coveralls.io/r/ymyzk/python-gyazo?branch=master
   :alt: Coverage Status

A Python wrapper for Gyazo API.

The full-documentation is available on `Read the Docs`_.

Requirements
------------
* Python 2.7+
* Python 3.4+
* PyPy
* PyPy3

Installation
------------
.. code-block:: shell

   pip install python-gyazo

Note: Please use the latest version of setuptools & pip

.. code-block:: shell

   pip install -U setuptools pip


Usage
-----
At first, you must create an application and get an access token from https://gyazo.com/oauth/applications

.. code-block:: python

   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
------
``gyazo-backup`` is moved to `python-gyazo-backup`_.

License
-------
MIT License. Please see `LICENSE`_.

.. _Read the Docs: https://python-gyazo.readthedocs.io/
.. _python-gyazo-backup: https://github.com/ymyzk/python-gyazo-backup
.. _LICENSE: LICENSE


