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.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.1.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.1-py3-none-any.whl (8.5 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: twemoji_api-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 4018866f2a575037082af5acb47f04705c839214e716c324607b31d006555545
MD5 2ef42f3cd4d1408550b5120f20da488c
BLAKE2b-256 c5f0da09b575c0b4d215f6d1237d0bcbedf7628b2b80ff12afcea229f300b694

See more details on using hashes here.

File details

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

File metadata

  • Download URL: twemoji_api-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 85a8e64c15113ba08fdfbcbb6b8ab123e29376b769dd843d997028a4b5d0bdf9
MD5 107e596e598084cbbdbbf047c776eeb2
BLAKE2b-256 ab6d81e9f253ba48a50ef0026d49562c0369480f30cb46d661e351e8fc2919cd

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