Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

dopememe

dope.meme for Python, and the dopememe command line: find meme templates, fill them, and get images and permanent URLs.

pip install dopememe     # the library
uvx dopememe --help      # or just the CLI

The library

from dopememe import Client

client = Client()  # an API key is optional: DOPEMEME_API_KEY, or api_key=

# Find a template by what you want to say, and read what each slot is for.
page = client.list_templates(q="preferring the new thing", tag=["slots:2"])
drake = client.retrieve_template(page.data[0].ref)

# Fill it. The URL is permanent, and nothing is stored.
render = client.render_meme(
    {
        "template": "drake-hotline",
        "slots": {"reject": "Writing SDKs by hand", "prefer": "Generating them"},
    }
)
print(render.url, render.alt)

# The image itself, as bytes.
image = client.render_image({"template": "drake-hotline", "slots": {"reject": "a", "prefer": "b"}})
image.save("drake.webp")

# An embeddable URL, built without a request.
client.embed_url("drake-hotline", ["Writing SDKs by hand", "Generating them"])

# Save one for a short URL that keeps working.
meme = client.create_meme(recipe={"template": "drake-hotline", "slots": {"prefer": "this"}})

AsyncClient does the same with await. Lists page with list_templates_all(…). Errors are dopememe.APIError, with a stable code and every problem's path and hint; RateLimitError says how long to wait. A 429 is retried after Retry-After, and so are brief server errors when the request is safe to repeat.

Python 3.11 or newer. One dependency: httpx2.

The command line

dopememe search "preferring the new thing"
dopememe show drake-hotline
dopememe render drake-hotline "Writing SDKs by hand" "Generating them"            # its URL
dopememe render drake-hotline "Writing SDKs by hand" "Generating them" -o drake.png
dopememe render drake-hotline --slot prefer="Generating them" --preview           # inline, in iTerm2, WezTerm or kitty
dopememe url drake-hotline "Writing SDKs by hand" "Generating them"               # /g/, no request
dopememe save drake-hotline "Writing SDKs by hand" "Generating them"
dopememe login                                                                     # save an API key

Texts fill the template's text slots in reading order; --slot name=text names them. --recipe file.json (or - for stdin) takes a whole recipe. --json prints what the API returned, for scripts and agents.

Metadata

Release files for dopememe 0.1.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dopememe 0.1.0a1
File Size Uploaded Provenance
dopememe-0.1.0a1.tar.gz 18.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for dopememe 0.1.0a1
File Interpreter ABI Platform
dopememe-0.1.0a1-py3-none-any.whl Python 3 none any Details

Total release size: 40.4 kB

Release files / dopememe-0.1.0a1.tar.gz

Download URL dopememe-0.1.0a1.tar.gz
Size 18.6 kB
Tags Source
SHA-256 checksum
How to use checksums
97924d0373345b6eb9506b9a7cc14949b118a5a39b20c39c3e69b6698d099ef6
BLAKE2b-256 checksum
How to use checksums
401e9aae2de5de739899246468dbc2a0b01c86ccee499761dd13da934ebc831a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / dopememe-0.1.0a1-py3-none-any.whl

Download URL dopememe-0.1.0a1-py3-none-any.whl
Size 21.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
00a9ea6a037b5219c0ec45a346b2b1109431e64aa48ba6dde371a58223778763
BLAKE2b-256 checksum
How to use checksums
dd59621a483a0751d2b1d4f65a0da5d57217c18a120fc3ca095cf1f3fb5db548
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for dopememe 0.1.0a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page