Skip to main content

A playful cat-themed Python package with greetings, comfort, ASCII art, fortunes, and dramatic reactions to coding events.

Project description

CI

๐Ÿฑ Sand Cat

Sand Cat is a lighthearted and fun Python package designed to bring a little bit of joy, levity, and cuteness to developers' terminals. Inspired by the adorable sand cat, this package generates ASCII cat art, delivers cute greetings, predicts fortunes, reacts dramatically to everyday programming events, and offers comforting words when you're stuck on a bug.

PyPI: sand-cat on PyPI


Team Members


Features

Function Description Example
cat_greeting(name, mood) Playful greeting based on name and mood cat_greeting("Tuo", "happy")
get_fortune(treats) Fortune prediction based on treats given get_fortune(5)
cat_comfort(level) Comforting words for bug-stuck devs (1โ€“5) cat_comfort(3)
draw_cat(style) ASCII cat art in different poses draw_cat("ninja")
cat_energy(weather, energy_level) Weather + energy based fortune cat_energy("sunny", 8)
cat_reaction(event, intensity) Dramatic reaction to coding events (1โ€“3) cat_reaction("deploy", 3)

Installation

To use this package in your own Python projects, install it via pip:

pip install sand-cat

Then import it in your code:

from sandcat_fun import cat_greeting, draw_cat, cat_reaction

Usage & Code Examples

Example Program

We have a complete example program that demonstrates all functions: Example Program (demo.py)

Run it with:

python demo.py

Function Details

1. cat_greeting(name: str, mood: str)

Return a playful cat-style greeting based on the user's name and mood.

from sandcat_fun import cat_greeting

greeting = cat_greeting("Hollan", mood="happy")
print(greeting)
# "Meow, Hollan! This sand cat is thrilled to see your happy paws today."

greeting = cat_greeting("Hollan", mood="grumpy")
print(greeting)
# "Hiss... just kidding, Hollan. Even grumpy humans deserve a soft sand cat hello."

Valid moods: happy, sleepy, grumpy, excited, calm

2. get_fortune(treats: int = 1)

The magical sand cat predicts your fortune. More treats = better fortune!

from sandcat_fun import get_fortune

fortune = get_fortune(treats=5)
print(fortune)
# "Purrr! The Sand Cat is pleased. A bug you've been chasing for days will suddenly make sense today!"

3. cat_comfort(level: int = 1)

Comforting words for developers stuck on a bug. Level ranges from 1 (mild) to 5 (emergency comfort).

from sandcat_fun import cat_comfort

comfort_msg = cat_comfort(level=5)
print(comfort_msg)
# "PURRRR... developer emergency comfort activated. ..."

4. draw_cat(style: str = "sleeping")

Generates cute ASCII cat text art in various poses.

from sandcat_fun import draw_cat

art = draw_cat(style="coding")
print(art)
#    /\_/\
#   ( @.@ )  [Bug]
#    > ^ <   /
#   / [___] \

Valid styles: sleeping, stretching, sitting, playing, coding, ninja, loaf

5. cat_energy(weather: str, energy_level: int)

Returns a cat-style fortune based on the current weather and your energy level (1โ€“10).

from sandcat_fun import cat_energy

fortune = cat_energy("sunny", 8)
print(fortune)
# "This is a zoomie-powered cat fortune for a Sunny day: ..."

fortune = cat_fortune("rainy", 2)
print(fortune)
# "This is a nap-friendly cat fortune for a Rainy day: ..."

Valid weather options: sunny, rainy, cloudy, snowy, windy

6. cat_reaction(event: str, intensity: int = 1)

Returns a dramatic cat reaction to common programming events. Intensity goes from 1 (mild) to 3 (maximum drama).

from sandcat_fun import cat_reaction

reaction = cat_reaction("bug_fixed", 2)
print(reaction)
# "Purrr! The sand cat does a little victory stretch! That bug never stood a chance!"

reaction = cat_reaction("deploy", 3)
print(reaction)
# "MROW!! *hides under desk* IS IT FRIDAY?! WHY ARE WE DEPLOYING?! ROLLBACK PLAN READY?!"

Valid events: bug_fixed, code_review, deploy, merge_conflict, friday, monday


Project Structure

3-package-sand_cat/
โ”œโ”€โ”€ sandcat_fun/             # Main package source code
โ”‚   โ”œโ”€โ”€ __init__.py          # Package exports
โ”‚   โ”œโ”€โ”€ cat.py               # cat_greeting, cat_comfort, cat_fortune
โ”‚   โ”œโ”€โ”€ draw.py              # draw_cat (ASCII art)
โ”‚   โ”œโ”€โ”€ fortune.py           # get_fortune
โ”‚   โ””โ”€โ”€ reaction.py          # cat_reaction
โ”œโ”€โ”€ tests/                   # Unit tests (pytest)
โ”‚   โ”œโ”€โ”€ test_cat.py
โ”‚   โ”œโ”€โ”€ test_draw.py
โ”‚   โ”œโ”€โ”€ test_fortune.py
โ”‚   โ””โ”€โ”€ test_reaction.py
โ”œโ”€โ”€ demo.py                  # Example program using all functions
โ”œโ”€โ”€ Pipfile                  # pipenv dependency management
โ”œโ”€โ”€ Pipfile.lock
โ”œโ”€โ”€ pyproject.toml           # Build configuration
โ”œโ”€โ”€ .github/
โ”‚   โ””โ”€โ”€ workflows/
โ”‚       โ””โ”€โ”€ ci.yml           # GitHub Actions CI workflow
โ”œโ”€โ”€ LICENSE
โ””โ”€โ”€ README.md

Contributor Guide

If you want to contribute to the project, follow these steps to set up the development environment on any platform.

1. Prerequisites

Make sure you have Python 3.10+ and pipenv installed.

pip install --user pipenv

2. Clone and Setup

git clone https://github.com/swe-students-spring2026/3-package-sand_cat.git
cd 3-package-sand_cat

# Create virtual environment and install all dependencies
pipenv install --dev

# Activate the virtual environment
pipenv shell

3. Running Tests

We use pytest for unit testing. Every function has at least 3 assertions covering normal usage, edge cases, and invalid inputs.

pipenv run pytest -v

4. Building the Package

Build the wheel and source distribution using build:

python -m build

This generates the built files in the dist/ directory.

5. Publishing to PyPI

Upload the package to PyPI using twine:

# For TestPyPI (testing)
python -m twine upload --repository testpypi dist/*

# For PyPI (production)
python -m twine upload dist/*

CI/CD Overview

This project uses GitHub Actions for continuous integration. The CI workflow (.github/workflows/ci.yml) automatically runs on every push and pull request:

  • Builds and tests the package on two Python versions (3.10 and 3.11)
  • Uses pipenv to install dependencies in an isolated environment
  • Runs the full pytest test suite to catch regressions early

License

GNU General Public License v3. See LICENSE for details.

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

sand_cat-0.1.0.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

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

sand_cat-0.1.0-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file sand_cat-0.1.0.tar.gz.

File metadata

  • Download URL: sand_cat-0.1.0.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for sand_cat-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e73a2b925e6e864979be519dc0a7a68eeae050ecc2591afe8a5b92d595affdd2
MD5 9110d42bc380ad43e8755f4677c7c58a
BLAKE2b-256 15ad1eaf0236dcbcb33206b60ed7547789452b46745341dc79136e724c6ebb74

See more details on using hashes here.

File details

Details for the file sand_cat-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sand_cat-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for sand_cat-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f99e171df8fcccbce67ce2af786e48a4c276e4144d9d7ef6e4de04ec90be6a1
MD5 be1bd1574d0751f5894ed41e4f3128e5
BLAKE2b-256 38ca16f98a9594edba2011f4b451aa71ee19d7da815c68017700d57a71c93c15

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