Skip to main content

A package that generates “fortune cookie” messages, programming wisdom, or absurd advice when called.

Project description

Fortune Cookie Cravaggio

log github events CI / CD

Team members: Nina Li, Sirui Wang, Bohan Yin, Nick Zhu

Table of Contents

  1. Description
  2. Installation
  3. Usage Examples
  4. Contributing

Description

A package that generates “fortune cookie” messages, programming wisdom, or absurd advice when called.

You can find the package here:

Installation

Below is how you can import the Fortune Cookie Generator package into your own projects using pip.

1. Install the package

pip install fortunecookiecravaggio

2. Import the functions in your Python code

from fortunecookiecravaggio import get_fortune, fortune_of_the_day, custom_fortune, fortune_with_ascii_art

3. Add a fortunes.txt in the directory

Create your own or download the predefined list fortunes.txt

Usage Examples

See example.py

1. Get a random fortune based on user input: get_fortune("Any word, phrase, or thought")

user_input = input("Enter a word, phrase, or thought to receive your fortune: ")
print(get_fortune(user_input))

2. Discover the daily prophecy: fortune_of_the_day()

print("Fortune of the Day:", fortune_of_the_day())

3. Add your own fortune messages: custom_fortune("Custom message")

custom_msg = input("Enter your custom fortune message: ")
added_msg = custom_fortune(custom_msg)
print("Custom fortune added:", added_msg)

4. Get a fortune with an ASCII fortune cookie: fortune_with_ascii_art()

print(fortune_with_ascii_art())

Contributing

Here’s how you can help:

1. Clone the repository

git clone https://github.com/software-students-spring2025/3-python-package-cravaggio
cd 3-python-package-cravaggio

2. Create a branch

git checkout -b yourbranchname

3. Set up virtual environment

pip install pipenv
pipenv install --dev
pipenv shell

4. Make your changes

5. Commit and Push

git add .
git commit -m "your changes"
git push origin yourbranchname

6. Submit a pull request with your changes

7. (optional) Test, build and upload

pytest
python -m build
twine upload -r testpypi dist/*

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

fortunecookiecravaggio-1.0.2.tar.gz (44.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fortunecookiecravaggio-1.0.2-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

Details for the file fortunecookiecravaggio-1.0.2.tar.gz.

File metadata

  • Download URL: fortunecookiecravaggio-1.0.2.tar.gz
  • Upload date:
  • Size: 44.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for fortunecookiecravaggio-1.0.2.tar.gz
Algorithm Hash digest
SHA256 a8010080665ecb374f76475ea1c34e68b8477914ce3f743032d24609eb5577ff
MD5 24428574888d4f8151e9eee3ad05fa35
BLAKE2b-256 403e739522c9a34e1d8686c2eba80bfa983c5bbd8e27e3ee2bfd4c624b3fcb77

See more details on using hashes here.

File details

Details for the file fortunecookiecravaggio-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for fortunecookiecravaggio-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7594dadd1732f8ed40b8b9ee1749d94b239958c01afc26f45a473f117aac6d03
MD5 48fdfd575afa1654e3c3f2f534050f5b
BLAKE2b-256 1e572ae0fd09d1d00fd954faedd6e444cbbc39b0f86f7ecbce55aefe6958e19d

See more details on using hashes here.

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