Skip to content
MockNews creates fake news headlines, stories and world events.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



MockNews creates fake news headlines, stories and world events.

It is written in Python and exposes a Python API but you do not need to know Python to use it. It supports invocation from the command-line as a CLI tool, or for use as a batch process.

Requires only Python 2.5 (or greater 2.x).


From command-line:


It will print out the Top News for 2 days, showing only the headlines.
Here's an example:

    Top News

    Day 1

    Greece Declares War On Portugal
    Earthquake Rocks Las Vegas
    Train Derailment Near Berlin
    Shareholder Lawsuit Filed Against TrollTech

    Day 2

    Private Jets Business Booming
    Luxembourg Elects New Leader
    Plane Crash Near New Orleans
    Sting Weds Oprah

Your results may vary. Please consult your doctor. Not responsible for lost or stolen items. Remain vigilant at all times. Your waiter will be with your shortly. Why no, in fact, these are not the pants I was looking for, but thank you anyway, madam.

From within a Python app via the module API:

    import mocknews

    # make it behave exactly like command-line default invocation:

    # without calling main() you could instead generate and return headlines:
    headlines = mocknews.headlines()
    # The returned value is a dict mapping from a tock (a time segment, defaults to 1 day) to a list of headlines associated with that tock. Each headline is a string. The number of tock entries is whatever you specified as the optional sole int param to the headlines() call, with a default of 2 tocks.
    # ... here do something with the headlines in your app...

You can also alter the content of the files in the data directory in order to customize MockNews for your application.

If you have any questions, suggestions, bug reports or desired features, please feel free to let me know.


Mike Kramlich
You can’t perform that action at this time.