emoji_data.character module¶
- class emoji_data.character.EmojiCharProperty(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
Enum
Emoji Character Properties
character properties are available for emoji characters.
- EMOJI = 'Emoji'¶
for characters that are emoji
- EPRES = 'Emoji_Presentation'¶
for characters that have emoji presentation by default
- EMOD = 'Emoji_Modifier'¶
for characters that are emoji modifiers
- EBASE = 'Emoji_Modifier_Base'¶
for characters that can serve as a base for emoji modifiers
- ECOMP = 'Emoji_Component'¶
for characters used in emoji sequences that normally do not appear on emoji keyboards as separate choices, such as keycap base characters or Regional_Indicator characters.
All characters in emoji sequences are either Emoji or Emoji_Component. Implementations must not, however, assume that all Emoji_Component characters are also Emoji. There are some non-emoji characters that are used in various emoji sequences, such as tag characters and ZWJ.
- EXTPICT = 'Extended_Pictographic'¶
for characters that are used to future-proof segmentation.
The Extended_Pictographic characters contain all the Emoji characters except for some Emoji_Component characters.
- final class emoji_data.character.EmojiCharacter(code_point: int, properties: EmojiCharProperty | Iterable[EmojiCharProperty] | None = None, version: str | None = None, description: str | None = None)[source]¶
Bases:
object
emoji character — A character that has the Emoji property.
These characters are recommended for use as emoji.
- Parameters:
code_point (int)
properties (Union[EmojiCharProperty, Iterable[EmojiCharProperty], None])
version (Optional[str])
description (Optional[str])
- classmethod initial()[source]¶
Initial the class
Load Emoji Characters and it’s properties from package data file into class internal dictionary
- classmethod items() Iterator[Tuple[int, Self]] [source]¶
Returns an iterator of all code-point -> emoji-character pairs of the class
- classmethod keys() Iterator[int] [source]¶
Returns an iterator of each emoji-character’s key code-point of the class
- classmethod values() Iterator[Self] [source]¶
Returns an iterator of all emoji-characters of the class
- property code_point_string: str¶
Unicode style hex string of the emoji-characters’s code-point
Example
"25FB"
- property properties: Sequence[EmojiCharProperty]¶
Property description text of the emoji-characters
- classmethod from_character(c: str) Self [source]¶
Get
EmojiCharacter
instance from a single Emoji Unicode character
- emoji_data.character.TEXT_PRESENTATION_SELECTOR = 65038¶
The character U+FE0E VARIATION SELECTOR-15 (VS15), used to request a text presentation for an emoji character. (Also known as text variation selector in prior versions of this specification.)
- emoji_data.character.EMOJI_PRESENTATION_SELECTOR = 65039¶
The character U+FE0F VARIATION SELECTOR-16 (VS16), used to request an emoji presentation for an emoji character. (Also known as emoji variation selector in prior versions of this specification.)
- emoji_data.character.EMOJI_KEYCAP = 8419¶
A sequence of the following form:
emoji_keycap_sequence := [0-9#*] \x{FE0F 20E3}
These sequences are in the emoji-sequences.txt file listed under the type_field
Emoji_Keycap_Sequence
- emoji_data.character.REGIONAL_INDICATORS = [127462, 127463, 127464, 127465, 127466, 127467, 127468, 127469, 127470, 127471, 127472, 127473, 127474, 127475, 127476, 127477, 127478, 127479, 127480, 127481, 127482, 127483, 127484, 127485, 127486, 127487]¶
regional indicators
- emoji_data.character.TAGS = [917536, 917537, 917538, 917539, 917540, 917541, 917542, 917543, 917544, 917545, 917546, 917547, 917548, 917549, 917550, 917551, 917552, 917553, 917554, 917555, 917556, 917557, 917558, 917559, 917560, 917561, 917562, 917563, 917564, 917565, 917566, 917567, 917568, 917569, 917570, 917571, 917572, 917573, 917574, 917575, 917576, 917577, 917578, 917579, 917580, 917581, 917582, 917583, 917584, 917585, 917586, 917587, 917588, 917589, 917590, 917591, 917592, 917593, 917594, 917595, 917596, 917597, 917598, 917599, 917600, 917601, 917602, 917603, 917604, 917605, 917606, 917607, 917608, 917609, 917610, 917611, 917612, 917613, 917614, 917615, 917616, 917617, 917618, 917619, 917620, 917621, 917622, 917623, 917624, 917625, 917626, 917627, 917628, 917629, 917630, 917631]¶
tags
- emoji_data.character.ZWJ = 8205¶
An emoji sequence with at least one joiner character.