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.1.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

fortune_python-1.1.1-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file fortune-python-1.1.1.tar.gz.

File metadata

  • Download URL: fortune-python-1.1.1.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.6

File hashes

Hashes for fortune-python-1.1.1.tar.gz
Algorithm Hash digest
SHA256 1742eb35eb000589546f1b16bccd573a110d848c8edeb6616d2604ca62029197
MD5 03a3950b87816e0271c204a7a43f27ba
BLAKE2b-256 1b7b90647ed1619855c9acc34f7191cb825069d0dbb1c936a020f34b8a86a809

See more details on using hashes here.

File details

Details for the file fortune_python-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for fortune_python-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8a111112e39ce034afa744f010cc3d6dc7406f6fed21a78116ffdfea26ee53bd
MD5 7c20ef0fc837dc5c69da6921f9d19902
BLAKE2b-256 9d06fcaba2f0d0b0639466bc5389df31f970ae22d04dc948a9666d873121137b

See more details on using hashes here.

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