Skip to main content

barn-owl

Python build & test

A fun owl-themed package!

PyPI page: https://pypi.org/project/barn-owl/


Installation

Install the barn_owl module with pip:

pip install barn-owl

Usage

A full runnable demo that calls every public function is in examples/demo.py. From the repo root after pip install barn-owl or pipenv install --dev:

python examples/demo.py

Owl wisdom

owl_wisdom(topic="life") -> str returns a random owl-themed quip for a given theme. Pass topic as one of "life" (default), "coding", "friendship", "nature", or "food". Any other value raises ValueError with a hint listing valid topics.

from barn_owl import owl_wisdom

print(owl_wisdom())

print(owl_wisdom(topic="coding"))

Owl Latin

to_owl_latin(text) -> str returns a string containing the translation of the input into owl latin; that is, appends 'hoo' to words starting with a non-consonant, otherwise, moves leading consonants to the end and appends 'oo'. In both cases, the translation keeps all leading and trailing punctuation as-is.

from barn_owl import to_owl_latin

print(to_owl_latin("hello world"))
# Prints "ellohoo orldwoo"

Owl Drawing

owl_drawing(style) -> str returns a string representation of an ASCII emoji illustration of an owl based on the chosen style. Choose a style from either "wise", "cute", "spooky", "funny", "large", "duo", or "emoji". Any invalid parameters will raise a ValueError.

from barn_owl import owl_drawing

print(owl_drawing("cute"))
# prints a cute owl drawing from the database

Owl Jokes

owl_jokes(category="python") -> str returns a random owl-themed joke from the specified category. Choose a category from "python" (default), "programming", or "cold". Any other value raises ValueError with a hint listing valid categories.

from barn_owl import owl_jokes

print(owl_jokes())                    # defaults to "python"
print(owl_jokes(category="programming"))
# prints a programming-related owl joke

Owl Name Generator

owl_name_generator(style="wise") -> str returns a randomly generated owl name for the given style. Choose from "wise" (default), "spooky", "cute", or "funny". Any other value raises ValueError with a hint listing valid styles.

from barn_owl import owl_name_generator

print(owl_name_generator())               # defaults to "wise"
print(owl_name_generator(style="spooky"))
# prints a spooky owl name

Contributing

Prerequisites

Set up the development environment

git clone https://github.com/swe-students-spring2026/3-package-barn_owl.git
cd 3-package-barn_owl
pipenv install --dev

This installs all dependencies and the package itself in editable mode.

Run tests

python -m pytest

Build the package

python -m build

Publish to PyPI (maintainers only)

twine upload -r testpypi dist/*

Developer workflow

  1. Create a feature branch off main.
  2. Make your changes and add tests.
  3. Open a pull request to main and ask a teammate to review.
  4. After approval and passing CI, merge and delete the feature branch.

Team

Metadata

Release files for barn-owl 0.0.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 barn-owl 0.0.1
File Size Uploaded
barn_owl-0.0.1.tar.gz 56.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for barn-owl 0.0.1
File Interpreter ABI Platform
barn_owl-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 98.5 kB

Release files / barn_owl-0.0.1.tar.gz

Download URL barn_owl-0.0.1.tar.gz
Size 56.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d4720d7693f324ec95935086d82428f4c8b2b3723bd6e492f9c1755b94e87c30
BLAKE2b-256 checksum
How to use checksums
c299dda874864b40540616bc0a2ef5259712327ffe46dd3f11a20c9044aad10b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / barn_owl-0.0.1-py3-none-any.whl

Download URL barn_owl-0.0.1-py3-none-any.whl
Size 41.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c58fb9e1bbdc1d9ae4477c99d6a049a88a34c0d1bbb171e348fc859c79fbc4ca
BLAKE2b-256 checksum
How to use checksums
5ead9d5e9c3d822a3cdd1c3ff502405522e6011ae2b33f20ad0f7b66ce67fe82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

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