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 generate

print(generate())              # returns a general excuse
print(generate("deadline"))    # returns a deadline-related excuse
print(generate("meeting"))     # returns a meeting-related excuse

Available categories:

  • general
  • deadline
  • meeting
  • class

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.1.tar.gz (17.2 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.1-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: excusegen-0.1.1.tar.gz
  • Upload date:
  • Size: 17.2 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.1.tar.gz
Algorithm Hash digest
SHA256 1132ccabb0c001943ce0cc73a64fca4eb4d92a8be8690419b4c15dc227ca58b0
MD5 84da210c3f15dcc50c6b9d8aec7dd0fd
BLAKE2b-256 545804a8359961966bc8b7fa29814a5ce2dfd9335dc48d2ac7d29dd7653334a6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: excusegen-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b6b72d4f5ca7ded40d6fc22bab65bfb784c03a79d84e68b6e9d53154599250c7
MD5 ccb43afe9c9da2854742e5d03a95282f
BLAKE2b-256 81a90586299cd2a6bf2fb497d46f21fdd57ea37c53d87bd484d3769a91f764a9

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