Skip to main content

Apilmoji

An asynchronous emoji rendering Extension for PIL

LICENSE pypi python ruff pre-commit codecov

✨ Features

  • 🎨 Unicode Emoji Support - Render standard Unicode emojis
  • 💬 Discord Emoji Support - Render custom Discord emojis
  • 🔄 Concurrent Downloads - Support concurrent emoji downloads for better performance
  • 💾 Smart Caching - Local file caching to avoid repeated downloads
  • 🎭 Multiple Styles - Support for Apple, Google, Twitter, Facebook, and other styles
  • 📊 Progress Display - Optional progress bar for download progress

📦 Installation

Requirements: Python 3.10 or higher

uv add apilmoji

Or install from source:

uv add git+https://github.com/fllesser/apilmoji

🚀 Quick Start

Basic Usage (Unicode Emojis Only)

import asyncio
from PIL import Image, ImageFont
from apilmoji import Apilmoji


async def main():
    text = """
    Hello, world! 👋
    "We have standard emojis: 😂, 🚀, 🐍, 💻.",
    "And some more: 🌟✨🔥💯.",
    """

    # create image
    image = Image.new("RGB", (550, 150), (255, 255, 255))
    font = ImageFont.truetype("arial.ttf", 24)

    # render text with emojis
    await Apilmoji.text(image, (10, 10), text.strip(), font, fill=(0, 0, 0))

    image.save("output.png")
    image.show()


asyncio.run(main())

Discord Emoji Support

import asyncio
from PIL import Image, ImageFont
from apilmoji import Apilmoji, EmojiCDNSource

async def main():
    text = """
    Unicode emojis: 👋 🎨 😎
    Discord emojis: <:rooThink:123456789012345678>
    """

    image = Image.new("RGB", (550, 100), (255, 255, 255))
    font = ImageFont.truetype("arial.ttf", 24)
    source = EmojiCDNSource()
    await Apilmoji.text_with_discord(
        image,
        (10, 40),
        text,
        font,
        fill=(0, 0, 0),
        source=source,
    )

    image.save("output.png")

asyncio.run(main())

🎨 Emoji Styles

Choose different emoji styles:

from apilmoji import Apilmoji, EmojiCDNSource, EmojiStyle

# Apple style (default)
source = EmojiCDNSource(style=EmojiStyle.APPLE)

# Google style
source = EmojiCDNSource(style=EmojiStyle.GOOGLE)

await Apilmoji.text(
    image,
    (10, 10),
    "Hello 👋",
    font,
    source=source
)

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🐛 Issues

If you encounter any issues, please report them on the GitHub Issues page.

Metadata

Release files for apilmoji 0.3.1

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

Source distribution (sdist)

Source distribution for apilmoji 0.3.1
File Size Uploaded Provenance Actions
apilmoji-0.3.1.tar.gz 8.6 kB Without provenance Details for apilmoji-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for apilmoji 0.3.1
File Interpreter ABI Platform Actions
apilmoji-0.3.1-py3-none-any.whl Python 3 none any Details for apilmoji-0.3.1-py3-none-any.whl

Total release size: 17.8 kB

Release files / apilmoji-0.3.1.tar.gz

Download URL apilmoji-0.3.1.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1490d0076e0b47bfb1b14bef9733a4d23181f54d8ecb212604f5ec0e11127428
BLAKE2b-256 checksum
How to use checksums
2a7fb6aa1676273195ded802af383d07328d9e751419a33ea59666481ba606dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / apilmoji-0.3.1-py3-none-any.whl

Download URL apilmoji-0.3.1-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
305ec445d19b1cd11f21e07cf1d2bd9f3ae5be9fc688a6589f823dd67428da15
BLAKE2b-256 checksum
How to use checksums
374148460d135db4be801fbb4840f60f4671b41cc5043f6c1d48a6cbeb91f4b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for apilmoji 0.3.1

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

0.3.1 This release

2 release files No provenance

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