Skip to main content

A python lib to get dank memes

Project description

MemeLib

A python lib to get dank memes

PyPI License PyPI - Python Version Issues

Installation

MemeLib is installed through PyPi

pip install MemeLib

Usage

from memelib.api import DankMemeClient

myclient = DankMemeClient()

await myclient.async_meme(subreddit="dankmemes")

That returns a dict. (note: there is also a synchronous function: DankMemeClient.meme())

{'title': 'Creeping in', 'author': 'u/charles2x2', 'subreddit': 'r/dankmemes', 'upvotes': 117, 'comments': 6, 'img_url': 'https://i.redd.it/c1onsrvplnu51.jpg', 'post_url': 'https://reddit.com/r/dankmemes/comments/jg0ax7/creeping_in/'}

Params for the DankMemeClient call:

reddit_user_agent: str | The reddit user agent. Preferrably, this would be the name of your application.

return_embed: bool | Whether to return a Discord.py embed.

embed_color | A color for the discord embed. Must be in 0xFFFFFF format.

If return_embed is true, this will automatically return a nicely formatted embed.

Example:

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

MemeLib-0.1.5.tar.gz (16.1 kB view hashes)

Uploaded Source

Built Distribution

MemeLib-0.1.5-py3-none-any.whl (16.5 kB view hashes)

Uploaded Python 3

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