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.2.tar.gz (104.4 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.2-py3-none-any.whl (99.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: faker_news-0.1.2.tar.gz
  • Upload date:
  • Size: 104.4 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.2.tar.gz
Algorithm Hash digest
SHA256 aece14cbc1bf83d0b225fc24b0c2ee1678e145fb5c693ecdbc9c694518d2b7ba
MD5 a8a22bca00d5da2d13946a3ae1b48a9d
BLAKE2b-256 ab6bf28d5e6eb710597b6000d19a7eb207d8bab2aba0e8fe0aebd161881adaf2

See more details on using hashes here.

Provenance

The following attestation bundles were made for faker_news-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: faker_news-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 99.5 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4312d8da1784bbc6c454aff434b8c269314fd6013923953189a21cc603e1e682
MD5 d414c098aa1419e4446177d6a229b9b2
BLAKE2b-256 8aa4bae2cdecc2de6e009292671bc731564dcf24c07107e7ff115a08beb82fe2

See more details on using hashes here.

Provenance

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