Skip to main content

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
['...', '...', '...']

Project details

Download files

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

Source Distributions (22.7 kB view hashes)

Uploaded source

loremipsum-1.0.2.tar.gz (18.2 kB view hashes)

Uploaded source

Built Distributions

loremipsum-1.0.2-py2.7.egg (20.8 kB view hashes)

Uploaded 2 7

loremipsum-1.0.2-py2.6.egg (20.9 kB view hashes)

Uploaded 2 6

loremipsum-1.0.2-py2.5.egg (20.9 kB view hashes)

Uploaded 2 5

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page