Skip to main content

IpsumHeroes

Where lorem ipsum meets the legends of history.

A playful lorem ipsum generator that sprinkles placeholder text with the names and quotes of history’s luminaries and heroes. Ideal for developers, designers,' and writers who want their filler text to be more inspiring.

Features

  • Generate lorem ipsum with historical luminaries
  • Supports English, Dutch, German, French, and Spanish
  • Choose your topic from: ancient world (default), science, or music
  • Add your own dataset of heroes
  • Lightweight and easy to integrate

Adjustable Parameters

  • Number of sentences, paragraphs, sections, and words per section
  • Sentence punctuation (., ?, !)
  • Indentation, tags (XML/HTML), wrapping columns
  • Optional value ranges for randomness

. . . and many other configuration options (see the manual).

Usage Examples

See also the docstrings and example files in the /examples directory on GitHub.com

Start by importing the package under the alias ips:

import ipsumheroes as ips

Example 1: default mode

In the default mode IpsumHeroes behaves like a normal ipsum-text generator.

text = ips.paragraphs_text(num_paragraphs=2)
print(text)

       Harum animi laboriosam distinctio voluptas quia, sunt omnis quam cumque
   voluptatibus?  Neque voluptas odit quasi commodi?  Perferendis corrupti
   assumenda fuga harum rerum suscipit ducimus voluptas fugiat porro, hic totam
   voluptate beatae delectus assumenda.  Ad repudiandae tempora laudantium.
   Hic provident veritatis aspernatur obcaecati vitae quisquam odio ullam
   minima aut?  Repellat nulla perferendis sequi fugiat consequuntur quia
   deserunt possimus recusandae quam.  Quasi nam ducimus dolore velit pariatur
   autem ipsum voluptate!

       Veritatis libero optio sit magni asperiores vero inventore.  Illum
   voluptate aliquid quae eos corrupti impedit.  Ducimus incidunt repudiandae
   perspiciatis aut facere nobis libero tenetur, rem perferendis molestias
   quae.  Ad iste repudiandae veniam excepturi amet pariatur, ducimus impedit
   alias autem adipisci praesentium placeat laudantium ipsum blanditiis.  Est
   voluptatem animi iusto maxime quasi repellat facilis sed.

Example 2: with luminary enrichment

When the luminaries switch is on, the text is enriched with the names of ancient luminaries. We also increase the change that a sentence will be enriched with a luminary (scale 0 till 10).

text = ips.paragraphs_text(with_luminaries=True, luminary_probability=6)
print(text)

       Culpa laudantium commodi velit incidunt porro nemo ❮Aratus❯ rerum,
   dignissimos molestias ipsa illum vero aspernatur veritatis placeat expedita.
   ❮Euclid❯ at aspernatur fugit exercitationem eius.  Magnam ❮Sophocles❯
   expedita, suscipit accusantium recusandae inventore laudantium officiis
   autem iure ❮Horace❯ voluptatem.  Placeat nihil accusantium ab fuga tempore
   ❮Xenophon❯ laboriosam dicta adipisci?  Temporibus totam sequi veritatis a
   deleniti ipsam voluptas sunt at, ducimus eaque magnam saepe.

To emphasize the luminaries, the default tags are adjusted so that the names are printed in italics with an extra space around them. In this case, we need to set additional configuration options—use the config object to do this. See the docstrings of paragraphs and/or paragraphs_text for more details.

cfg = ips.get_config()
cfg.with_luminaries = True
cfg.luminary_probability = 6
cfg.tag_luminary_start = " *"    # italic markdown support
cfg.tag_luminary_end = "* "      # italic markdown support 
text = ips.paragraphs_text(cfg)
print(text)

       *Homer*  rerum praesentium!  Dolores voluptatum quam tenetur  *Cicero*
   distinctio iusto eligendi necessitatibus ipsum, nostrum vel tempore eveniet
   quo impedit in dicta id optio hic?  Quia vitae incidunt facilis  *Julius
   Caesar*  quis saepe magni obcaecati, error possimus voluptates sapiente quos
   *Seneca the Younger*. 

cfg.tag_luminary_start = "<i>"   # italic html support
cfg.tag_luminary_end = "</i>"    # italic html support 
print(ips.paragraphs_text(cfg))

       Necessitatibus <i>Empedocles</i> dolor dicta natus odit consequatur,
   soluta et iste officiis reprehenderit voluptate modi nostrum.  Ratione
   deserunt <i>Xenophon</i>?  Eum <i>Homer</i> magnam harum iure expedita est
   reprehenderit aliquid!

Example 3: adding annotation

In this example an annotations is added at the end of each paragraph.

Here we used the convenience wrapper function without passing an explicit config object as a parameter. If needed, you can use a config object to adjust the layout of the annotation.

text = ips.paragraphs_text(with_luminaries=True, show_annotation=True)
print(text)

       Tempore ❮Democritus❯ sint, odio sequi officia necessitatibus
   ❮Pythagoras❯ ea.  Accusantium praesentium expedita non fugiat sunt fugit
   obcaecati vitae reprehenderit asperiores.  Provident earum veniam
   ❮Eratosthenes❯ necessitatibus eos excepturi corrupti, natus iusto quidem
   maiores non ❮Imhotep❯ dolorem placeat debitis id architecto.  Provident
   autem praesentium deserunt magnam tempore inventore consectetur nulla
   explicabo consequatur.  Tenetur placeat delectus ❮Khufu❯ deleniti
   recusandae, quae sapiente quaerat corporis tempore saepe beatae perferendis
   ❮Pliny the Elder❯?  Velit ab ipsum, illum perferendis quod voluptates
   dolorem non.

    ◆ Who They Were ◆
    ─────────────────
    ❯ Democritus; Philosopher - Developed atomic theory
      Abdera, Greece; c.460–370 BCE, aged 90
    ❯ Pythagoras; Mathematician - Pythagorean theorem
      Samos/Croton; c.570–495 BCE, aged 75
    ❯ Eratosthenes; Scientist - Measured Earth's circumference
      Alexandria; c.276–194 BCE, aged 82
    ❯ Imhotep; Architect & Physician - Designed the Step Pyramid
      Egypt; c.2650–2600 BCE, aged ?
    ❯ Khufu; Pharaoh - Built Great Pyramid of Giza
      Egypt; c.2589–2566 BCE, aged ?
    ❯ Pliny the Elder; Naturalist - Wrote Natural History
      Rome; 23–79 CE, aged 56

Installation

Install via pip:

pip install ipsumheroes

Full Manual

For the complete manual and detailed usage examples, see the IpsumHeroes Manual.

Metadata

Release files for ipsumheroes 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ipsumheroes 0.1.0
File Size Uploaded
ipsumheroes-0.1.0.tar.gz 48.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ipsumheroes 0.1.0
File Interpreter ABI Platform
ipsumheroes-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 100.0 kB

Release files / ipsumheroes-0.1.0.tar.gz

Download URL ipsumheroes-0.1.0.tar.gz
Size 48.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5d9b99de447c19d4e2257a14fa593aa564b68a1de5cfcc46d78378f9894ea7be
BLAKE2b-256 checksum
How to use checksums
75c25a8f5e73f0c46cdb7f9d62c18c20c86d816b5565cf15b856b8f7d6a4a121
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.5

Release files / ipsumheroes-0.1.0-py3-none-any.whl

Download URL ipsumheroes-0.1.0-py3-none-any.whl
Size 51.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af31def3ea7ce38ee551eeb4188bded121fbd0256a808086fff5af11b6219e05
BLAKE2b-256 checksum
How to use checksums
ffac6f487e4279a60a8f5eae762cfba35b24f181f88788cce8fe62d4f0b2e5a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page