Skip to main content

catsay 🐱 Python Version License

A cute ASCII cat library that says, warns, thinks, and asks questions. Perfect for making your CLI output more fun and expressive!

📝 Description

catsay is a tiny Python library that renders an ASCII cat with messages. It provides several functions for different use cases:

  • 🗣️ say — The cat says text with a given mood
  • ⚠️ warn — The cat outputs a warning
  • ❌ error — The cat shows an error message
  • 💭 think — The cat thinks thoughtfully
  • ❓ ask — The cat asks a question and returns the user's answer

Features:

  • 🎭 4 moods — happy, sleepy, angry, love
  • 📦 Zero dependencies — Pure Python, no extra packages
  • 🔌 Simple API — 5 functions for all use cases
  • 🎨 ASCII art — No external images or assets needed
  • 💬 Interactive — ask() reads user input

⚙️ Installation

Option 1: Install from PyPI

pip install catsay-py

Option 2: Copy the file

Just copy catsay.py into your project:

# Place catsay.py in your project directory

Option 3: Install from Git

git clone https://github.com/FelineFantasy/catsay
cd catsay
pip install .

Note: this package installs the top-level catsay module. If the unrelated catsay distribution is installed, remove it first (pip uninstall catsay), otherwise it shadows this library.

🚀 Usage

Basic

from catsay import say, warn, error, think, ask

say("Hello, World!")
warn("Don't forget to feed the cat!")
error("Something went wrong!")
think("Hmm, interesting...")
answer = ask("What's your name?")
print(f"User said: {answer}")

Moods

say("I'm happy!", mood="happy")
say("Zzz...", mood="sleepy")
say("I'm angry!", mood="angry")
say("I love you!", mood="love")

Without text

say()  # Just a cute cat
think()  # Thinking cat
warn()  # Warning cat
error()  # Error cat

📖 API Reference

say(text: str = "", mood: str = "happy") -> None

The cat says text with a given mood.

Parameter Type Default Description
text str "" Text to display
mood str "happy" Cat mood: happy, sleepy, angry, love

Raises: ValueError if mood is not supported

Example:

say("Meow!")
#    /\_/\
#   ( o.o )  >  Meow!
#    > ^ <

warn(text: str = "") -> None

The cat outputs a warning.

Parameter Type Default Description
text str "" Warning message

Example:

warn("Low disk space!")
#    /\_/\
#   ( -.o )  ~  Low disk space! ~~~
#    > ^ <

error(text: str = "Error") -> None

The cat outputs an error message (uses angry mood).

Parameter Type Default Description
text str "Error" Error message

Example:

error("File not found!")
#    /\_/\
#   ( >.< )  >  !!! File not found! !!!
#    > ^ <

think(text: str = "", mood: str = "happy") -> None

The cat says text thoughtfully (with < bubble).

Parameter Type Default Description
text str "" Text to think about
mood str "happy" Cat mood

Raises: ValueError if mood is not supported

Example:

think("Hmm, interesting...")
#    /\_/\
#   ( o.o )  <  Hmm, interesting...
#    > ^ <

ask(question: str = "") -> str

The cat asks a question and returns the user's answer.

Parameter Type Default Description
question str "" Question to ask

Returns: str — User's input

Example:

name = ask("What's your name?")
print(f"Hello, {name}!")

🎭 Moods

Mood Face Description
happy o.o Default, friendly cat
sleepy -.- Tired, drowsy cat
angry >.< Angry, frustrated cat
love ^.^ Loving, affectionate cat

🧪 Full Example

from catsay import say, warn, error, think, ask

print("=== say() ===\n")
say()
say("Meow!", mood="happy")
say("Zzz", mood="sleepy")
say("meow :(", mood="angry")
say("I love you!", mood="love")

print("\n=== warn() ===\n")
warn()
warn("Where's my food!")

print("\n=== error() ===\n")
error()
error("The cat has fallen!")

print("\n=== think() ===\n")
think()
think("Hmm", mood="happy")
think("Hmm", mood="sleepy")
think("Hmm", mood="angry")
think("Hmm", mood="love")

print("\n=== ask() ===\n")
ask()
ask("Where's my food?")

🧪 Testing

Run the test suite with the standard library unittest:

python -m unittest discover -s tests -v

Tests also run automatically on every push and pull request via GitHub Actions.

📁 Project Structure

catsay/
├── .github/
│   ├── FUNDING.yml           # Support link for DonationAlerts
│   └── workflows/
│       └── tests.yml         # CI workflow for running tests
├── catsay.py                 # Main library
├── README.md                 # Documentation
├── LICENSE                   # MIT License
├── pyproject.toml            # Package configuration
├── tests/
│   └── test_catsay.py        # Unit tests
└── .gitignore                # Git ignore rules

🛠 Technologies

  • Python 3.8+ — Pure standard library, no external dependencies

📋 Requirements

  • Python 3.8+
  • No external dependencies

💖 Support the Project

If you enjoy catsay and want to help keep the project alive, you can support me here:

DonationAlerts

Your support helps me:

  • 🐱 Keep developing cute tools
  • 🛠️ Add more moods and features
  • ☕ Stay awake while coding at 4 AM

Every little bit is appreciated! ❤️

👤 Author

  • FelineFantasy
  • License: MIT

Metadata

Release files for catsay-py 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for catsay-py 0.1.1
File Size Uploaded Provenance
catsay_py-0.1.1.tar.gz 5.9 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for catsay-py 0.1.1
File Interpreter ABI Platform
catsay_py-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.2 kB

Release files / catsay_py-0.1.1.tar.gz

Download URL catsay_py-0.1.1.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e6597a316716a6afdc3c6f7bcc7591305b7bf35b1cf67a5e431e20808e52ddf8
BLAKE2b-256 checksum
How to use checksums
0d71dc0c0eda130a4e761542b40f9de48c2d7bc7dace994e60be21b424346b95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / catsay_py-0.1.1-py3-none-any.whl

Download URL catsay_py-0.1.1-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1150a0445fa9bfa43c5f12a3643ec32eb2b6d063e03c8c32ea8bda5c0d5d341c
BLAKE2b-256 checksum
How to use checksums
ea8c7019a1f02da73bf807be8238f637b92707f29352edacb56ff3f4fe327fd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Security for catsay-py 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for catsay_py-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page