The name of the package conflict between `emoji` and` django-emoji`

I need to use the library django-emojiand emojiin the same project Django. Both are installed via pip. Both of these libraries are imported from a package with the name emoji:

When importing from django-emoji:

from emoji import Emoji

When importing from emoji:

from emoji.core import get_emoji_regexp

Any idea on how to rename the package that is installed in the library, and still install it through pip?

+4
source share
1 answer
import emoji as django_emoji
django_emoji.Emoji

Does it work, or am I missing something?

-1
source

Source: https://habr.com/ru/post/1668011/


All Articles