Fabulist
Generate meaningful test data based on string templates.
Usage
$ pip install fabulist
then
from fabulist import Fabulist
fab = Fabulist()
templates = [
"$(Verb:ing) is better than $(verb:ing).",
"$(Noun:an) a day keeps the $(noun:plural) away.",
"If you want to $(verb) $(adv), $(verb) $(adv)!",
'Confucius says: "The one who wants to $(verb) must $(verb) $(adv) the $(noun)!"',
]
print("Fortune cookies:")
for q in fab.generate_quotes(templates, count=10):
print("- ", q)
will produce something like
Fortune cookies:
- A statement a day keeps the airports away.
- Savoring is better than magnifying.
- If you want to sate divisively, disuse calmly!
- Praying is better than inspecting.
- Confucius says: "The one who wants to sterilize must inform miserably the possibility!"
- If you want to blur orderly, stride poorly!
- A cost a day keeps the gears away.
- Subtracting is better than worshipping.
- If you want to damage solely, discuss jealously!
- Confucius says: "The one who wants to vanish must swear terribly the punch!"
See also the Introduction Slides and Read The Docs for details.
Release files for fabulist 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fabulist-2.0.1.tar.gz | 77.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fabulist-2.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:144.5 kB
Release files / fabulist-2.0.1.tar.gz
| Download URL | fabulist-2.0.1.tar.gz |
|---|---|
| Size | 77.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fee0f340e404808ea94458521e28e94301f2329688c35a0bfa9108c5d852307d
|
|
BLAKE2b-256 checksum How to use checksums |
8993f5275cb92666aaa034a89ac342f67c5780476936e969256d5b75d5d4c49c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / fabulist-2.0.1-py3-none-any.whl
| Download URL | fabulist-2.0.1-py3-none-any.whl |
|---|---|
| Size | 67.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d17aee99f5d2a10490f505b12036641a0514c14e7998a5cb4e9a1bd02072dd0
|
|
BLAKE2b-256 checksum How to use checksums |
43c1ecb8a6072af48172d5f26a37ba262957820ebb3ca1c44b8df863f6b516c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|