Skip to main content

A Fortune clone in Python

Project description

Python Fortune

A simple self-contained clone of fortune. Try it out with cowsay!

Install

pip install fortune-python

Usage

CLI

Currently, a fortune command line program is added on install.

fortune

This will select a random fortune. Adding the fortune command line arguments is planned later.

Programmatic

To use this package, import the fortune function and call:

from fortune import fortune

print(fortune())

This will produce a random fortune.

Notes

The fortune data for this package is taken from fortune-mod. Please see the datfiles directory in this repo for their corresponding license.

The offensive fortunes in the 'off' directory are not included in this Python package. However, the fortunes provided in this package are otherwise provided as they were in the original fortune-mod repository. I do not take responsibility for the content of these fortunes.

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

fortune-python-1.1.0.tar.gz (1.1 MB view hashes)

Uploaded Source

Built Distribution

fortune_python-1.1.0-py3-none-any.whl (1.1 MB view hashes)

Uploaded Python 3

Supported by

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