Skip to main content

A dog-themed Python package

Project description

Python Package Exercise

CI

A Python package exercise pyfundog lets you generate ASCII dogs that can speak, bark, wag, and pose.

See instructions for details.


Team members:

Features

speak(message, mood)

Returns a dog ASCII with a message and mood (happy, sleepy, angry)

Example:

from pydog import speak

print(speak("hello!", "happy"))

bark(num_barks)

Returns a dog ASCII with a speech bubble containing "bark" repeated num_barks times

Example:

from pydog import bark

print(bark(3))

wag(message)

Returns a wagging dog ASCII that echoes the message

Example:

from pydog import wag

print(wag("Good dog!"))

fetch(item)

Returns a dog ASCII carrying the specified item.

Raises:

  • ValueError if item is empty or whitespace
  • TypeError if item is not a string

Example:

from pydog import fetch

print(fetch("ball"))

pose(trick, mood)

Returns a dog ASCII performing a specific trick with a given mood.

Valid tricks: sit, stand, stare

Valid moods: happy, sleepy, angry

Raises:

  • ValueError if trick or mood is invalid

Example:

from pydog import pose

print(pose("sit", "happy"))
print(pose("stand", "sleepy"))
print(pose("stare", "angry"))

install from PyPI:

https://pypi.org/project/pyfundog/

pip install pyfundog

Usage (CLI)

python -m pydog --bark 3
python -m pydog --wag "hello"
python -m pydog --speak-message "hi" --speak-mood happy
python -m pydog --pose sit happy

Example Program

Run the demo:

pipenv run python examples/demo.py

Developer Setup:

#Python 3.9, 3.10, 3.11

# Clone repo:
git clone https://github.com/swe-students-spring2026/3-package-river_dolphin.git
cd 3-package-river_dolphin

# Install pipenv: 
pip install pipenv

# Install dependencies:
pipenv install --dev
pipenv install -e .

# Run tests:
pipenv run pytest

# Build package:
pipenv run python -m build

Contributing:

# Python 3.9, 3.10, 3.11

# Create a feature branch:
git checkout -b feature/your-feature

# Make changes and test: 
pipenv run pytest

# Commit and push:
git add .
git commit -m "Add feature"
git push origin feature/your-feature

# Open a PR on GitHub

License:

Licensed under the MIT License. See License.

Course Exercise:

This repository is part of the package engineering exercise documented in instructions.

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

pyfundog-0.1.1.tar.gz (45.3 kB view details)

Uploaded Source

Built Distribution

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

pyfundog-0.1.1-py3-none-any.whl (31.6 kB view details)

Uploaded Python 3

File details

Details for the file pyfundog-0.1.1.tar.gz.

File metadata

  • Download URL: pyfundog-0.1.1.tar.gz
  • Upload date:
  • Size: 45.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.1

File hashes

Hashes for pyfundog-0.1.1.tar.gz
Algorithm Hash digest
SHA256 86d91c542cdeac115aa9f27617d289a6cb9bd7c433f666a4f80446c4dbd726ad
MD5 8cbbd2315de09217d4d0b00d1194ea34
BLAKE2b-256 34e8fe47e86f4ef41d54e92bfa15b2ca5c235ad1dc8f2e7054e589b983a3b866

See more details on using hashes here.

File details

Details for the file pyfundog-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyfundog-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 31.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.1

File hashes

Hashes for pyfundog-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 82ca463909a972598eb0ae5309fc165f6e326b529c08891d3c780c1d170bd799
MD5 a172f9c5f67693f74411ae2471146d97
BLAKE2b-256 07a9231faddb41a6b2092edfb21eaf21c45259ef028fb54d7220030e05e44089

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