Skip to main content

Generates bad excuses

Project description

excusegen

excusegen is a python package that generates random excuses for various situations, for those of us who are less creative. Read about the project on PyPI here!

CI / CD

Team Members

Jeffrey Chen
Sophia Fu
Avi Herman
Alissa Hsu
Jacob Ng

Installation and Testing (for Developers)

If you want to install this project on your own machine (for testing or further development purposes), first clone the repository and install dependencies using Pipenv:

git clone https://github.com/swe-students-fall2025/3-python-package-team_ember.git
cd excusegen
pipenv install --dev

Next install the package itself in editable mode:

pipenv run pip install -e .

If you don't have Pipenv installed, install it first:

pip install pipenv

To enter the virutal environment, run:

pipenv shell

To perform tests, run:

pipenv run pytest -q

Importing and Usage (for Users)

First, install the package from PyPI with pip:

pip install excusegen

Alternatively, install the package directly from this GitHub repo:

git clone https://github.com/swe-students-fall2025/3-python-package-team_ember.git
cd excusegen
pipenv install .

If you don't have Pipenv installed, install it first:

pip install pipenv

Then, run the package from the command line:

python3 -m excusegen

Or use it in Python code:

from excusegen import get_excuse, get_excuses, add_excuse, list_excuses

print(get_excuse())                # returns a general excuse
print(get_excuse("deadline"))      # returns a deadline-related excuse
print(get_excuses("meeting", count=2))   # returns two excuses from the meeting category
add_excuse("general", "My keyboard took a break.")   # adds a new excuse
print(list_excuses("general"))     # lists all general excuses

Available categories:

  • general
  • deadline
  • meeting
  • class

Example python code with all functions: example.py

Run the example python code from the command line:

python3 example.py

Functions and Features

Function Purpose Parameters Raises
get_excuse() randomly returns an excuse from the specified category category (str) - type of excuse to return (deadline, meeting, class, or general) ValueError if the category doesn't exist
get_excuses() randomly returns a number of excuses equal to count from the specified category, returns all excuses if count is not specified 1. category (str) - type of excuse to return (deadline, meeting, class, or general)
2. count (int or None) - number of excuses to return
ValueError if the category doesn't exist
TypeError if count is not an int
ValueError if count less than 0
list_excuses() returns all excuses from the selected category as a list category (str) - type of excuse to return (deadline, meeting, class, or general) ValueError if the category doesn't exist
add_excuse() adds a new excuse to an existing category 1. category (str) - category name ('deadline', 'meeting', 'class', or 'general')
2. excuse (str) - text of the excuse to add
ValueError if category not found or excuse invalid

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

excusegen-0.1.2.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

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

excusegen-0.1.2-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file excusegen-0.1.2.tar.gz.

File metadata

  • Download URL: excusegen-0.1.2.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for excusegen-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0f3de18ec8b149bb07afc8fe962f4d82d1c9ca5b6dc8760436bae94a38e709e2
MD5 44c3028d2aecddc83b19b1614a9f6e4b
BLAKE2b-256 6af5db98c4e30284b33ce1a7bac3ded8a32eabc901b7272300359465a1b893af

See more details on using hashes here.

File details

Details for the file excusegen-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: excusegen-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for excusegen-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 735cc7cbe69df37434b4172a52dedccdf187590f0c16f5c51af09eca24558fa8
MD5 791137b25349528914724771a662ae7b
BLAKE2b-256 b2a4232fca929589e01df5cef6096bdbce358e1b555ac342c4ac29d676270070

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