Skip to main content

A fun owl-themed package!

Project description

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

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

barn_owl-0.0.1.tar.gz (56.9 kB view details)

Uploaded Source

Built Distribution

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

barn_owl-0.0.1-py3-none-any.whl (41.6 kB view details)

Uploaded Python 3

File details

Details for the file barn_owl-0.0.1.tar.gz.

File metadata

  • Download URL: barn_owl-0.0.1.tar.gz
  • Upload date:
  • Size: 56.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for barn_owl-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d4720d7693f324ec95935086d82428f4c8b2b3723bd6e492f9c1755b94e87c30
MD5 a2562bbf9cccf1f4e1fad17abb1c2b5a
BLAKE2b-256 c299dda874864b40540616bc0a2ef5259712327ffe46dd3f11a20c9044aad10b

See more details on using hashes here.

File details

Details for the file barn_owl-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: barn_owl-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 41.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for barn_owl-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c58fb9e1bbdc1d9ae4477c99d6a049a88a34c0d1bbb171e348fc859c79fbc4ca
MD5 0048d053a258831dedd127b10688a6c4
BLAKE2b-256 5ead9d5e9c3d822a3cdd1c3ff502405522e6011ae2b33f20ad0f7b66ce67fe82

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