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.0.tar.gz (103.5 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.0-py3-none-any.whl (99.1 kB view details)

Uploaded Python 3

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

Hashes for faker_news-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5a1c772280a31b0ef74af4094650a1afde6a0611cc67ea4fad5e7e79d1a1a526
MD5 effa36d5af74cb0afaf3f1663ec43f96
BLAKE2b-256 a23df9ea0c11d152f0477a35b9ff80d2839b813b0d81a3c3308b738ceabf2ad6

See more details on using hashes here.

Provenance

The following attestation bundles were made for faker_news-0.1.0.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.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

Hashes for faker_news-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9747169f655ca97ef99ce85e57208f525afa9c04712a5bb48bb089a862c4ea3
MD5 f07f1efa0db5580b76645c5e086814c3
BLAKE2b-256 c48c7f6c7e8037917c742486d51dda30838d2672aa2d7bcdaabd52cce7178d0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for faker_news-0.1.0-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