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: https://pypi.org/project/fortunecookiecravaggio/

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 pypi 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.3.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.3-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fortunecookiecravaggio-1.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 de95b0da6764747b218a76195a98c2489deb9d97afbfbf7b98f3b415c74c2fa1
MD5 a775696f44af72b80de8f9e99b816c5e
BLAKE2b-256 191047a2919ac5c28b3dc5d95593f43ff55d3930342c3e2dec7aaee417fe8db0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fortunecookiecravaggio-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 88598c16385da13c4a76c554ffe7560c22e474f578d92c6edadd9965387166e5
MD5 e0b8a9526391c28d649c52ae360de8a3
BLAKE2b-256 7c0417a76e3e0f62ce5c668ed3c62e52b78492beefe121db0a5fe7683cabc20e

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