Skip to main content
Help improve PyPI by participating in a 5-minute user interface survey!

A Lorem Ipsum text generator

Project Description

You may import the Generator class to instantiate your generator with your own sample text and a dictionary:

>>> from loremipsum import Generator
>>>
>>> sample = file('data/sample.txt').read()
>>> dictionary = file('data/dictionary.txt').read().split()
>>>
>>> g = Generator(sample, dictionary)
>>> g.generate_sentence() #doctest: +ELLIPSIS
(...)
>>>

or just import get_sentences or get_paragraphs which interface to a module wide Generator instance.

>>> from loremipsum import get_paragraphs, get_sentences
>>>
>>> get_sentences(5) #doctest: +ELLIPSIS
['...', '...', '...', '...', '...']
>>> get_paragraphs(3) #doctest: +ELLIPSIS
['...', '...', '...']

Release history Release notifications

History Node

1.0.5

History Node

1.0.4

This version
History Node

1.0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
loremipsum-1.0.2-py2.5.egg (20.9 kB) Copy SHA256 hash SHA256 Egg 2.5 Aug 29, 2011
loremipsum-1.0.2-py2.6.egg (20.9 kB) Copy SHA256 hash SHA256 Egg 2.6 Aug 29, 2011
loremipsum-1.0.2-py2.7.egg (20.8 kB) Copy SHA256 hash SHA256 Egg 2.7 Aug 29, 2011
loremipsum-1.0.2.tar.gz (18.2 kB) Copy SHA256 hash SHA256 Source None Aug 29, 2011
loremipsum-1.0.2.zip (22.7 kB) Copy SHA256 hash SHA256 Source None Aug 29, 2011

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page