Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sfischer13/python-lorem
:snake: Python library for the generation of random text that looks like Latin
https://github.com/sfischer13/python-lorem
generator ipsum library lorem placeholder python python-3 random-text
Last synced: 7 days ago
JSON representation
:snake: Python library for the generation of random text that looks like Latin
- Host: GitHub
- URL: https://github.com/sfischer13/python-lorem
- Owner: sfischer13
- License: mit
- Created: 2016-06-13T21:52:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-06-15T01:04:40.000Z (over 3 years ago)
- Last Synced: 2024-10-18T13:16:54.198Z (21 days ago)
- Topics: generator, ipsum, library, lorem, placeholder, python, python-3, random-text
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 29
- Watchers: 1
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- Changelog: HISTORY.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
Awesome Lists containing this project
README
====================
Python Lorem Package
====================.. image:: https://img.shields.io/pypi/v/lorem.svg
:target: https://pypi.python.org/pypi/lorem.. image:: https://img.shields.io/travis/sfischer13/python-lorem.svg
:target: https://travis-ci.org/sfischer13/python-loremSummary
-------Generator for random text that looks like Latin.
Simple Example
--------------.. code:: python
import lorem
s = lorem.sentence() # 'Eius dolorem dolorem labore neque.'
p = lorem.paragraph()
t = lorem.text()Complex Example
---------------.. code:: python
from lorem.text import TextLorem
# separate words by '-'
# sentence length should be between 2 and 3
# choose words from A, B, C and D
lorem = TextLorem(wsep='-', srange=(2,3), words="A B C D".split())
s1 = lorem.sentence() # 'C-B.'
s2 = lorem.sentence() # 'C-A-C.'