Skip to main content

An open source Python wrapper for the imgflip RESTful API (https://api.imgflip.com).

Project description

imgflippy

An open source Python interface for the imgflip RESTful API imgflippy has been developed to remain true to the original API while offering the conveniences that Python allows.

Quickstart

imgflippy has been written with the intention of allowing for meme generation from either a command line interface or an interpreted environment.

Command Line

get_memes

Print a table of the popular memes that may be captioned with this API:

From the imgflip API documentation:

The size of this array and the order of memes may change at any time. When this description was written, it returned 100 memes ordered by how many times they were captioned in the last 30 days. Additional properties other than those listed below may be added in the future without warning, so do not assume the JSON structure of each meme will never have new properties.

$ python -m imgflippy get_memes
Template ID |                      Name                      |               URL
------------+------------------------------------------------+---------------------------------
112126428   | Distracted Boyfriend                           | https://i.imgflip.com/1ur9b0.jpg
181913649   | Drake Hotline Bling                            | https://i.imgflip.com/30b1gx.jpg
87743020    | Two Buttons                                    | https://i.imgflip.com/1g8my4.jpg
...
add_caption

From the imgflip API documentation:

Add a caption to an Imgflip meme template. Images created with this API will be publicly accessible by anyone through the url in the response - there is no "private" option. This does not mean these memes will be posted publicly though, one still needs to know the exact URL to find the image. If the image hangs around on Imgflip servers for a while and gets very few views (direct image views and image page views both count), it will be auto-deleted to save space.

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

imgflippy-0.0.3.tar.gz (8.5 kB view hashes)

Uploaded Source

Built Distribution

imgflippy-0.0.3-py3-none-any.whl (11.4 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