Skip to main content

A fun fortune cookie generator with lucky number and color

Project description

CI / CD

PyPI: https://pypi.org/project/PyFortuneCookie/

PyFortuneCookie

PyFortuneCookie is a Python package that generates your daily fortune cookie — complete with a lucky number, color and day!

Team Members

Sina Liu

Aayan Mathur

Daniel Huang

Haonan Cai

Abdul Mendahawi


Installation

Clone or download this repository, then install it locally (in editable mode):

pipenv install
pipenv run pip install -e .

If you don’t have pipenv, install it first:

pip install pipenv

Run Locally (for teammates)

If you want to run this project on your own machine (e.g., to test or modify it):

# 1️⃣ Clone the repository
git clone https://github.com/swe-students-fall2025/3-python-package-team_meridian.git

cd pyfortunecookie

# 2️⃣ Install pipenv and dependencies
pip install pipenv
pipenv install

# 3️⃣ Enter the virtual environment
pipenv shell

# 4️⃣ Run the tests (optional, to verify everything works)
pipenv run pytest

# 5️⃣ Run the package
python3 -m pyfortunecookie

💡 You can exit the environment anytime with:

exit

Usage

You can run PyFortuneCookie either from the command line or directly as a Python module.

▶️ Option 1: Run as command-line tool

pipenv run pyfortunecookie

▶️ Option 2: Run as a Python module

pipenv run python -m pyfortunecookie

▶️ Option 3: Import and use functions in your code

from pyfortunecookie.core import get_fortune, get_lucky_number, get_color

print(get_fortune())
print(get_lucky_number())
print(get_color())

Example Output

When you run the command:

pipenv run pyfortunecookie

You might see something like this:

Welcome Screen


🥠 Welcome to PyFortune Cookie!

Select a category:

1. Zodiac & MBTI Summary
2. Tarot Reading
3. Personalized Fortune
4. Rune Reading
5. Lucky Day
   Enter 1 / 2 / 3 / 4 / 5:

Category 1 – Zodiac & MBTI Summary


Enter your zodiac (e.g., Aries, Libra, Pisces): Libra
Enter your MBTI (e.g., INFP, ESTJ): INFP

🌙 Your Fortune Summary 🌙
Zodiac: Libra | MBTI: INFP
Fortune: Your curiosity is your superpower. 🔍 Let your imagination guide you!
Lucky Number: 42
Lucky Color: lavender
Lucky Day: Friday - A blessed day awaits you.

Category 2 – Tarot Reading


🔮 Tarot Reading:
The Star: Hope quietly returns.

Category 3 – Personalized Fortune


🎴 Personalized Fortune (by your choices):
Choose an element ['fire', 'water', 'earth', 'air']: fire
Choose a time ['dawn', 'noon', 'dusk', 'midnight']: dawn
Choose a symbol ['star', 'moon', 'sun', 'cloud']: star

✨ Your Personalized Fortune ✨
Element: fire
Time: dawn
Symbol: star
Combination: You are passionate and energetic, seeking new beginnings, guided by guidance and aspiration.
Fortune: 🔥 🌅 ⭐ Reach for the stars; they're closer than you think!

Category 4 – Rune Reading


🔮 Rune Reading:

* Gebo: Gift, partnership, generosity.
* Ansuz: Wisdom, communication, divine inspiration.
* Wunjo: Joy, harmony, well-being.

Category 5 – Lucky Day


☀️ Lucky Day:
Day: Tuesday - Your determination will pay off today.

Exit


Would you like to choose another category? (y/n): n
🌟 Thank you for using PyFortune Cookie! Goodbye! 🌟


Features

Function Description
get_zodiac_mbti_summary() Generates a complete fortune summary based on the user's Zodiac sign and MBTI type, including lucky number, color, day, and fortune message
get_tarot_reading() Returns a tarot card reading with interpretation
get_fortune_by_choice() Returns a personalized fortune based on user-selected element, time, and symbol
get_rune_reading(n=None) Returns a rune reading with a random number (n) of runes and their meanings
get_lucky_day() Returns a randomly selected lucky day and its symbolic meaning

Run Tests

Make sure everything works properly with:

pipenv run pytest

All tests are located inside the tests/ directory.


Project Structure

3-python-package-team_meridian/
├── src/
│   └── pyfortunecookie/
│       ├── __init__.py
│       ├── __main__.py
│       └── core.py
├── tests/
│   └── test_core.py
├── Pipfile
├── pyproject.toml
└── README.md

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

pyfortunecookie_teammeridian-0.1.3.tar.gz (50.5 kB view details)

Uploaded Source

Built Distribution

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

pyfortunecookie_teammeridian-0.1.3-py3-none-any.whl (36.2 kB view details)

Uploaded Python 3

File details

Details for the file pyfortunecookie_teammeridian-0.1.3.tar.gz.

File metadata

File hashes

Hashes for pyfortunecookie_teammeridian-0.1.3.tar.gz
Algorithm Hash digest
SHA256 a09fb1bd1072d25832ea7d99344a29bb0c7e4a148bc01997e809da6782e10da6
MD5 8473cea6fe4b4ac9395b7b3c199511c0
BLAKE2b-256 9b756da98a2073c2398cfdeab16f2276145e44facd45b5f4cb8b46dc82d303f1

See more details on using hashes here.

File details

Details for the file pyfortunecookie_teammeridian-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pyfortunecookie_teammeridian-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c374c7b661ce0c7979b75ad25ca25c88dfeaea1f469b2089d749703d53d1d534
MD5 a8c2331d5c620cf493b29e05a22b258e
BLAKE2b-256 e36f2c5a43b8ad7f9727e446402858a8ebfac342e99e5c76595114acfa6dd362

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