Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

faker_news-0.1.1.tar.gz (104.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

faker_news-0.1.1-py3-none-any.whl (99.4 kB view details)

Uploaded Python 3

File details

Details for the file faker_news-0.1.1.tar.gz.

File metadata

  • Download URL: faker_news-0.1.1.tar.gz
  • Upload date:
  • Size: 104.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for faker_news-0.1.1.tar.gz
Algorithm Hash digest
SHA256 22a8f544f37293da19fdc058cd8a86e515af56edaa04de3fab652f70fa2502f7
MD5 0da15ae2c7cb86a7e42c504d0bc3aa78
BLAKE2b-256 8ec4529e5eab20a46b4fa95ca9b25d53f8996cb129e4f3290b37d5e4d28d5dac

See more details on using hashes here.

Provenance

The following attestation bundles were made for faker_news-0.1.1.tar.gz:

Publisher: publish.yml on SmileyChris/faker-news

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file faker_news-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: faker_news-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 99.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for faker_news-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f1b53bba3ea5585d519a7b3e63ba268d534b63294f5e48e35881e73213db1e74
MD5 e24becb6e6540b1825f10b39f50ed34a
BLAKE2b-256 d2d4bbefe1fc0e71fe054a18ee9dfbe669d033d0fc5503d249c82dcd546ab1ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for faker_news-0.1.1-py3-none-any.whl:

Publisher: publish.yml on SmileyChris/faker-news

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page