A lipsum.com API for Python.
Project description
Python-Lipsum-API
Generates Lorem Ipsum from https://www.lipsum.com/
Basic use
One time use
import lipsum
lipsum(mode, amount, start)
modes:
- words - generate x words
- paras - generate x paragraphs
- bytes - generate x characters
- lists - generate x lists
amount: How much is generated
start: Whether to start section with "Lorem ipsum dolor sit amet"
Repeated use
import lipsum
Lipsum = lipsum.LipsumGen()
Lipsum.amount(x)
Lipsum.start(True)
Lipsum.words()
Lipsum.bytes()
- First we create a grabber object
LipsumGen - Then we set the amount to be generated using
LipsumGen.amount - Set
LipsumGenobject to start with "Lorem ipsum dolor sit amet" - Now we can generate Lorem Ipsum using the various functions inside our
LipsumGenobject. See below for various functions:
LipsumGen.words()LipsumGen.paras()LipsumGen.bytes()LipsumGen.lists()
Note: you can set the amount when calling these functions LipsumGen.words(100)
Examples
Generate 100 characters of text:
import lipsum
lipsum.byte(100)
Generate 3 paragraphs the first of which starts with "Lorem ipsum dolor sit amet":
import lipsum
lipsum.paras(100, True)
Generate 10 sets of Loren Ipsum of Increasing size
import lipsum
Lipsum = lipsum.LipsumGen()
Lipsum.amount = 500
output = []
for i in range(10):
Lipsum.amount *= 2
output.append(Lipsum.bytes())
Latest Changes
- Initial release
for full changelog click here
TODO
- CLI
text output- file IO
- GUI
- visual output
- file IO
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lipsumAPI-1.1.tar.gz.
File metadata
- Download URL: lipsumAPI-1.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d7bb55d5bd8def7c9ea4bd3cc21f6604f13c234299c4d953e7a97b45e3a5b6f
|
|
| MD5 |
451c670fb66b908f897b1b2461924d0c
|
|
| BLAKE2b-256 |
16d8d8b956d882bd146635180c9ac7ede5690c146d22a10628ec5efcbcd05a2a
|
File details
Details for the file lipsumAPI-1.1-py3-none-any.whl.
File metadata
- Download URL: lipsumAPI-1.1-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63e14b524c481c00ba982fd9ee82b405f72a4348d827d5904874cfa9971c111d
|
|
| MD5 |
73f9d852d5f956cbf186003d29d2357f
|
|
| BLAKE2b-256 |
777201ef0931f754a718e56b0aed63d8b0019151b03c395cc0121f1f0c487f28
|