Metadata-Version: 2.1
Name: fabulist
Version: 2.0.1
Summary: "Generate random strings that make sense."
Home-page: https://github.com/mar10/fabulist/
Author: Martin Wendt
Author-email: fabulist@wwwendt.de
Maintainer: Martin Wendt
Maintainer-email: fabulist@wwwendt.de
License: MIT
Project-URL: Bug Tracker, https://github.com/mar10/fabulist/issues
Project-URL: Source Code, https://github.com/mar10/fabulist
Project-URL: Documentation, https://fabulist.readthedocs.io/
Project-URL: Download, https://github.com/mar10/fabulist/releases/latest
Keywords: python test-data word-list generator mock
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Description-Content-Type: text/markdown
License-File: LICENSE.txt

# Fabulist
[![Powered by You](http://sapegin.github.io/powered-by-you/badge.svg)](http://sapegin.github.io/powered-by-you/)
[![Tests](https://github.com/mar10/fabulist/actions/workflows/tests.yml/badge.svg)](https://github.com/mar10/fabulist/actions/workflows/tests.yml)
[![Latest Version](https://img.shields.io/pypi/v/fabulist.svg)](https://pypi.python.org/pypi/fabulist/)
[![License](https://img.shields.io/pypi/l/fabulist.svg)](https://github.com/mar10/fabulist/blob/master/LICENSE.txt)
[![Documentation Status](https://readthedocs.org/projects/fabulist/badge/?version=latest)](http://fabulist.readthedocs.io/)
[![codecov](https://codecov.io/github/mar10/fabulist/branch/main/graph/badge.svg?token=9xmAFm8Icl)](https://codecov.io/github/mar10/fabulist)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
[![Released with: Yabs](https://img.shields.io/badge/released%20with-yabs-yellowgreen)](https://github.com/mar10/yabs)
[![StackOverflow: fabulist](https://img.shields.io/badge/StackOverflow-fabulist-blue.svg)](https://stackoverflow.com/questions/tagged/fabulist)


> Generate meaningful test data based on string templates.

## Usage

```
$ pip install fabulist
```

then

```py
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](https://rawgit.com/mar10/fabulist/master/docs/intro_slides.html)
and [Read The Docs](http://fabulist.readthedocs.org/en/latest/) for details.
