Mimesis is a robust fake data generator for Python that produces realistic fake data across 35 different locales with high performance and multilingual support.
—
Generate textual content including words, sentences, paragraphs, colors, and various text-based data with locale-appropriate content for content creation and testing.
class Text(BaseDataProvider):
def word(self) -> str:
"""Generate a single word."""
def words(self, quantity: int = 5) -> list[str]:
"""Generate list of words."""
def sentence(self) -> str:
"""Generate a sentence."""
def text(self, quantity: int = 5) -> str:
"""Generate paragraph with specified sentence count."""
def title(self) -> str:
"""Generate a title."""
def quote(self) -> str:
"""Generate a quote."""
def answer(self) -> str:
"""Generate yes/no answer."""class Text(BaseDataProvider):
def color(self) -> str:
"""Generate color name like 'red', 'blue'."""
def hex_color(self, safe: bool = False) -> str:
"""Generate hex color code like '#FF5733'."""
def rgb_color(self, safe: bool = False) -> tuple[int, ...]:
"""Generate RGB color tuple like (255, 87, 51)."""
def emoji(self, category: EmojyCategory = EmojyCategory.DEFAULT) -> str:
"""Generate emoji character."""class Text(BaseDataProvider):
def alphabet(self, lower_case: bool = False) -> list[str]:
"""Generate alphabet letters."""
def level(self) -> str:
"""Generate level indicator."""from mimesis import Text
from mimesis.enums import EmojyCategory
text = Text()
# Text generation
content = {
'title': text.title(),
'paragraph': text.text(quantity=3),
'words': text.words(quantity=10),
'quote': text.quote()
}
# Color data
colors = {
'name': text.color(),
'hex': text.hex_color(),
'rgb': text.rgb_color(),
'safe_hex': text.hex_color(safe=True)
}
# Emojis
emoji_smile = text.emoji(EmojyCategory.SMILEYS_EMOTION)
emoji_food = text.emoji(EmojyCategory.FOOD_DRINK)Install with Tessl CLI
npx tessl i tessl/pypi-mimesis