Registry / data / lorem
library0.1.1pypypi✓ verified 23d ago

The `lorem` library (version 0.1.1) is a lightweight Python package designed to generate random text that resembles Latin, commonly known as 'Lorem Ipsum'. It provides simple functions for generating words, sentences, and paragraphs, as well as a more configurable class for advanced text generation. The project has not seen updates since 2016, indicating a stable but inactive development cadence.

pip install lorem
INSTALL
IMPORT
SIG · LOREM
L
lorem
datapythonv0.1.1
Install
1.5s avg
Import
10ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.002s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

lorem
import lorem
For direct access to simple text generation functions.
TextLorem
from lorem.text import TextLorem
For creating a configurable text generator instance.

This quickstart demonstrates both the direct utility functions for basic Lorem Ipsum generation and the `TextLorem` class for more customized output, such as specific word separators or sentence length ranges.

import lorem from lorem.text import TextLorem # Simple usage sentence = lorem.sentence() paragraph = lorem.paragraph() text = lorem.text() print(f"Sentence: {sentence}") print(f"Paragraph: {paragraph}") print(f"Text (multiple paragraphs): {text}") # Complex usage with TextLorem for custom generation custom_lorem = TextLorem(wsep='-', srange=(2,3), words="alpha beta gamma delta".split()) custom_sentence = custom_lorem.sentence() print(f"Custom sentence: {custom_sentence}")
Debug
Known issues
gotchaThe `lorem` package (0.1.1) has not been updated since June 2016. While functional for basic needs, it lacks modern features, ongoing maintenance, and explicit Python 3.6+ compatibility statements beyond its initial release era (Python 3.3, 3.4, 3.5). Users requiring active development or extensive features should consider alternative libraries.
fix
For basic Lorem Ipsum, this library is sufficient. For more robust or actively maintained solutions, consider alternatives like `lorem_text` or `lipsum`.
affects: <=0.1.1
gotchaThere are multiple Python packages available on PyPI with 'lorem' or 'lorem ipsum' in their names (e.g., `lorem_text`, `pyloremgen`, `lipsum`, `loremipsum`). Ensure you are installing and importing the correct package (`pip install lorem`) to avoid unexpected behavior or compatibility issues.
fix
Always verify the PyPI project name (`lorem`) and the expected import statements (`import lorem` or `from lorem.text import TextLorem`) against the official documentation or the GitHub repository (`sfischer13/python-lorem`).
affects: All versions
gotchaThe `lorem` library's `TextLorem` class offers customization options like `wsep` (word separator), `srange` (sentence length range), and `words` (custom word list). Failing to properly format `words` as a list of strings (e.g., `"A B C".split()`) can lead to unexpected output or errors.
fix
When using the `words` parameter in `TextLorem`, always provide a list of strings, e.g., `words=['word1', 'word2', 'word3']` or `words='word1 word2 word3'.split()`.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'lorem'
The 'lorem' package is not installed in the Python environment.
fix
Install the 'lorem' package using pip: 'pip install lorem'.
ImportError: cannot import name 'get_sentence' from 'lorem'
The function 'get_sentence' does not exist in the 'lorem' module.
fix
Use the correct function name: 'from lorem import sentence'.
AttributeError: module 'lorem' has no attribute 'generate_paragraph'
The 'lorem' module does not have a 'generate_paragraph' attribute.
fix
Use the correct function: 'from lorem import paragraph'.
TypeError: 'module' object is not callable
Attempting to call the 'lorem' module directly as a function.
fix
Use the appropriate function from the module: 'from lorem import paragraph; paragraph()'.
ImportError: cannot import name 'LoremGenerator' from 'lorem'
The 'LoremGenerator' class does not exist in the 'lorem' module.
fix
Use the correct class name: 'from lorem import Lorem'.
Upgrade
Version history
0.1.1latest on PyPI · released Jun 18, 2016
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
2
Amazon
1
Resources
lorem — pip install lorem · libregistry