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")

Multi-line messages

say() and think() print every line of the text, aligned under the first one:

say("Feeding time!\nWhere is my bowl?")
   /\_/\
  ( o.o )  >  Feeding time!
              Where is my bowl?
   > ^ <

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. Multi-line text is printed one line per row.

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). Multi-line text is printed one line per row.

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.2

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.2
File Size Uploaded Provenance
catsay_py-0.1.2.tar.gz 6.2 kB With provenance Details

Built distribution (wheel)

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

Total release size: 11.8 kB

Release files / catsay_py-0.1.2.tar.gz

Download URL catsay_py-0.1.2.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0b96e9441071e13a94a5f62aca5802e10b0f0323efb1528b1239247109897adb
BLAKE2b-256 checksum
How to use checksums
d422622da3e400655e6b0bb33a39e62b56186a56b997257f7b4106117e2a42c3
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 24, 2026.

Transparency log

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

Download URL catsay_py-0.1.2-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a68307d1359b5dc1fbd0bf9303cbd2f8f95c493f6587de2e1adeda9c0527373d
BLAKE2b-256 checksum
How to use checksums
55e798cacb06a85b6e80f614850f7cda76b19633616d790a6e1896f36db4c97e
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 24, 2026.

Transparency log

Security for catsay-py 0.1.2

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.2.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 24, 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