Metadata-Version: 2.4
Name: faker-literature
Version: 0.1.0
Summary: A Faker provider for generating literature-related data
Author: arribo44
Author-email: pypi-jctranc@mailo.com
Project-URL: Homepage, https://github.com/arribo44/faker-literature
Project-URL: Documentation, https://github.com/arribo44/faker-literature#readme
Project-URL: Source, https://github.com/arribo44/faker-literature
Project-URL: Bug Tracker, https://github.com/arribo44/faker-literature/issues
Keywords: faker literature books authors test data
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
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
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: faker>=20.0.0
Requires-Dist: tinydb>=4.0.0
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: keywords
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Faker Literature Provider

`faker-literature` is an additional [Faker](https://faker.readthedocs.io/) provider for generating literature-related test data. The first release supports `fr_FR` and `en_US`, with well-known French and English-language authors and works.

## Installation

```bash
pip install faker-literature
```

## Usage

```python
from faker import Faker
from faker_literature import LiteratureProvider

fake = Faker("fr_FR")
fake.add_provider(LiteratureProvider)

print(fake.writer())
print(fake.title())
print(fake.genre())
print(fake.publication_year())
print(fake.pages())
print(fake.publisher())
print(fake.book())
```

`book()` returns one coherent dictionary containing `writer`, `title`, `genre`, `year`, `pages`, and `publisher`. `author()` is an alias for `writer()`, and `literary_work()` is an alias for `book()`.

Supported locales are `fr_FR` and `en_US`. Using another locale raises `ValueError` so unsupported data is not silently mixed into a dataset.

## Development

```bash
python -m venv .venv
source .venv/bin/activate
pip install -e ".[test]"
pytest
python -m build
```

## Publishing on PyPI

After checking the generated distributions with `twine check dist/*`, upload them with:

```bash
twine upload dist/*
```
