Skip to main content

A lightweight utility for resolving emojis into file names, local asset paths, and URLs.

Project description

Twemoji API

A lightweight utility for resolving emojis into file names, local asset paths, and URLs. Supports both PNG and SVG assets using the Twemoji standard.

Features

  • Convert emojis to Unicode-based file names
  • Retrieve local file paths for emoji assets
  • Get direct URLs to Twemoji files
  • Supports PNG and SVG

Installation

pip install twemoji-api

Usage

from twemoji_api import get_emoji_path, get_emoji_url, Twemoji

print(get_emoji_path("🔥"))
print(get_emoji_url("🔥"))

emoji = Twemoji("🔥")
print(emoji.file_name)
print(emoji.path)
print(emoji.url)

Functions

get_emoji_path(emoji, extension="png")

Returns the local path for the emoji file.

get_emoji_url(emoji, extension="png")

Returns the URL to the emoji file.

get_emoji_file_name(emoji)

Converts the emoji into its Unicode filename format.

Twemoji

Object-oriented interface providing:

  • file_name
  • path
  • url

License

MIT

Twemoji Attribution

This project includes graphics from Twemoji. Copyright 2019 Twitter, Inc and other contributors. Licensed under CC-BY 4.0: https://creativecommons.org/licenses/by/4.0/ No changes were made.

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

twemoji_api-1.0.0.tar.gz (4.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

twemoji_api-1.0.0-py3-none-any.whl (8.5 MB view details)

Uploaded Python 3

File details

Details for the file twemoji_api-1.0.0.tar.gz.

File metadata

  • Download URL: twemoji_api-1.0.0.tar.gz
  • Upload date:
  • Size: 4.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for twemoji_api-1.0.0.tar.gz
Algorithm Hash digest
SHA256 fc87a8b0afe92d259c77f2a1299f35170ed8e078356151c44365516f78499f0c
MD5 67944ee3b80124909c39fe49f7ee42f5
BLAKE2b-256 e632bcabd1b908dd71320bd6a7fcdbe3d98ce77276cfc60fccc7c534b5494c11

See more details on using hashes here.

File details

Details for the file twemoji_api-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: twemoji_api-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for twemoji_api-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3e84fab8dabc23e8ce2ca84eca490c61fc0665583c11ee67d160c5b756bc18fd
MD5 2cbd69a189eb188e18b98e546b9b18ea
BLAKE2b-256 ff055d1e41f7d37d41740d61e2ee26a949e57dd9f14ad4d237b5657a05238cfe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page