Skip to main content

Fabulist

Powered by You Tests Latest Version License Documentation Status codecov Code style: black Released with: Yabs StackOverflow: 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)

Source distribution for fabulist 2.0.1
File Size Uploaded
fabulist-2.0.1.tar.gz 77.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fabulist 2.0.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files

2.0.0

2 release files

1.2.0

2 release files

1.1.1

1 release file

1.1.0

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page