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.4.tar.gz (51.7 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.4-py3-none-any.whl (36.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fortunecookiecravaggio-1.0.4.tar.gz
  • Upload date:
  • Size: 51.7 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.4.tar.gz
Algorithm Hash digest
SHA256 2a5740b0ea2da41f41f70569fcf2910380640bba3674543a7dba466f1e2b8920
MD5 04c07070b85793c4f89242b2d1099aa2
BLAKE2b-256 9d8a7aef6c2894ca9911a5155309230e585ddd81bdbebfc05c7866f9cc0857dd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fortunecookiecravaggio-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d3a1f7353a9a0ef3a7818bdea14ea3d6b154247ed7483e18e748922ffaf832ea
MD5 79b9e7a66bf692ca86b895580e09cc58
BLAKE2b-256 1fcd7c6b06fc01288f2a2e73ddbc5866d6bf95b10c48135be3c740b8c0d207ac

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