Faker provider for generating fake news content using OpenAI-compatible LLM APIs
Project description
faker-news
Faker provider that turns any OpenAI-compatible LLM into a fake news generator with caching and reuse controls.
Features
- Generate headlines, intros, and full articles on demand
- Keep content in a SQLite cache with per-item usage tracking
- Batch requests to minimize API calls and latency
- Works with OpenAI, Azure OpenAI, Qwen/DashScope, and other OpenAI-compatible APIs
Installation
pip install faker-news
Quick Start
Try it without installation using uvx:
# Set up your API key / load example data
uvx faker-news setup
# Browse generated articles
uvx faker-news browse
Use as a library:
from faker import Faker
from faker_news import NewsProvider
fake = Faker()
provider = NewsProvider(fake)
fake.add_provider(provider)
headline = fake.news_headline()
intro = fake.news_intro(headline=headline)
article = fake.news_article(headline=headline, words=500)
Documentation
Full guides, API reference, and CLI details live in the docs/ directory. Start with docs/quick-start.md or docs/cli-reference.md.
Contributing
See docs/contributing.md for the development workflow and guidelines.
License
MIT
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 faker_news-0.1.0.tar.gz.
File metadata
- Download URL: faker_news-0.1.0.tar.gz
- Upload date:
- Size: 103.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a1c772280a31b0ef74af4094650a1afde6a0611cc67ea4fad5e7e79d1a1a526
|
|
| MD5 |
effa36d5af74cb0afaf3f1663ec43f96
|
|
| BLAKE2b-256 |
a23df9ea0c11d152f0477a35b9ff80d2839b813b0d81a3c3308b738ceabf2ad6
|
Provenance
The following attestation bundles were made for faker_news-0.1.0.tar.gz:
Publisher:
publish.yml on SmileyChris/faker-news
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
faker_news-0.1.0.tar.gz -
Subject digest:
5a1c772280a31b0ef74af4094650a1afde6a0611cc67ea4fad5e7e79d1a1a526 - Sigstore transparency entry: 586300147
- Sigstore integration time:
-
Permalink:
SmileyChris/faker-news@2a8d50be415fd300071cb5d318dcb6f6caf3a725 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/SmileyChris
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2a8d50be415fd300071cb5d318dcb6f6caf3a725 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file faker_news-0.1.0-py3-none-any.whl.
File metadata
- Download URL: faker_news-0.1.0-py3-none-any.whl
- Upload date:
- Size: 99.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9747169f655ca97ef99ce85e57208f525afa9c04712a5bb48bb089a862c4ea3
|
|
| MD5 |
f07f1efa0db5580b76645c5e086814c3
|
|
| BLAKE2b-256 |
c48c7f6c7e8037917c742486d51dda30838d2672aa2d7bcdaabd52cce7178d0a
|
Provenance
The following attestation bundles were made for faker_news-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on SmileyChris/faker-news
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
faker_news-0.1.0-py3-none-any.whl -
Subject digest:
f9747169f655ca97ef99ce85e57208f525afa9c04712a5bb48bb089a862c4ea3 - Sigstore transparency entry: 586300157
- Sigstore integration time:
-
Permalink:
SmileyChris/faker-news@2a8d50be415fd300071cb5d318dcb6f6caf3a725 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/SmileyChris
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2a8d50be415fd300071cb5d318dcb6f6caf3a725 -
Trigger Event:
workflow_dispatch
-
Statement type: