Skip to main content

A simple API wrapper for tenor's gif api that is built with asyncio.

Project description

PyTenor

A simple API wrapper for tenor's gif api that is built with asyncio.

PyTenor's code is small and fairly documented as well using docstrings. There are plans to add an actual documentation in this README in the future..

Installation

python -m pip install pytenor

Examples

import asyncio
from pytenor import Tenor

api = Tenor(key="api key here")


async def main():
    # Search for gifs. This returns a GIF object.
    gifs = await api.search("linux users opening a new tab")

    print("Here are the gifs I found")
    for gif in gifs:
        print(f"URL: {gif.url} | Available Formats: {gif.available_formats}")


if __name__ == "__main__":
    asyncio.run(main())

Covered API Endpoints

  • /search
  • /trending
  • /categories
  • /search_suggestions
  • /autocomplete
  • /trending_terms
  • /registershare
  • /gifs

For more help on what parameters you can pass onto each method. Please red Tenor's API documentation.

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

pytenor-1.2.tar.gz (5.4 kB view hashes)

Uploaded Source

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