Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ankeshanand/py-gfycat
A Python client for the Gfycat API.
https://github.com/ankeshanand/py-gfycat
Last synced: 2 months ago
JSON representation
A Python client for the Gfycat API.
- Host: GitHub
- URL: https://github.com/ankeshanand/py-gfycat
- Owner: ankeshanand
- License: mit
- Created: 2015-07-30T13:06:25.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-05-21T10:37:11.000Z (over 3 years ago)
- Last Synced: 2024-08-09T03:25:51.694Z (5 months ago)
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 22
- Watchers: 6
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
py-gfycat
=========A Python client for the `Gfycat 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
--------------* GfycatClientError - General error handler, access message and status code via
.. code:: python
from gfycat.error import GfycatClientError
try
...
except GfycatClientError as e
print(e.error_message)
print(e.status_code)GfycatClient Functions
----------------------**Uploads**
- ``upload_from_url(url)``
- ``upload_from_file(filepath)``**Query a GFY for URLs and more information**
- ``query_gfy(gfyname)``
**Check if a link has been already converted**
- ``check_link(link)``
.. |PyPI version| image:: https://badge.fury.io/py/gfycat.svg
:target: http://badge.fury.io/py/gfycat