ankeshanand / py-gfycat

A Python client for the Gfycat API.
MIT License
21 stars 9 forks source link

py-gfycat

A Python client for the Gfycat API <https://gfycat.com/api>__.

|PyPI version|

Installation

::

pip install gfycat

Gfycat API Key

Go to https://developers.gfycat.com/signup/#/apiform and sign up for an API key if you don't already have one. Keep the Client ID and Client Secret to use for initializing the Python client.

Getting Started

.. code:: python

from gfycat.client import GfycatClient

client = GfycatClient(Gfycat Client ID, Gfycat Client Secret)

# Example request
client.upload_from_file('willsmith.gif')

Error Handling

.. code:: python

from gfycat.error import GfycatClientError

try
    ...
except GfycatClientError as e
    print(e.error_message)
    print(e.status_code)

GfycatClient Functions

Uploads

Query a GFY for URLs and more information

Check if a link has been already converted

.. |PyPI version| image:: https://badge.fury.io/py/gfycat.svg :target: http://badge.fury.io/py/gfycat