DEV Community

PLAYCAT
PLAYCAT

Posted on • Originally published at pypi.org

Building a Cat Enrichment Assessment Tool in Python

I built an open-source Python library for assessing indoor cat environmental enrichment. Here's why and how.

The Problem

Veterinary behaviorists recommend environmental enrichment for all indoor cats, but there's no standardized way to evaluate whether a home meets feline welfare standards. I compiled research from 14,000+ cats into a quantitative assessment tool.

Installation

pip install cat-enrichment
Enter fullscreen mode Exit fullscreen mode

Quick Start

from cat_enrichment import assess_home, research_stats, get_recommendations

result = assess_home(
    vertical_spaces=2,
    scratchers=1,
    hiding_spots=2,
    play_minutes=15,
    window_access=True,
    cats=1
)

print(f"Grade: {result.grade}")
print(f"Score: {result.score}/100")
print(f"Recommendations: {result.recommendations}")
Enter fullscreen mode Exit fullscreen mode

Research Statistics

from cat_enrichment import get_stat
cortisol = get_stat("cortisol_reduction")
print(cortisol)
# {'value': '37%', 'source': 'Journal of Feline Medicine and Surgery, 2023'}
Enter fullscreen mode Exit fullscreen mode

15 peer-reviewed statistics with full citations.

Enrichment Methods Database

32 evidence-based methods across 6 categories: vertical_space, scratching, hiding, play, observation, feeding_puzzle.

How Scoring Works

Four dimensions: Physical Environment (40%), Play & Stimulation (25%), Feeding Enrichment (15%), Social & Cognitive (20%).

Links:

Top comments (0)