Skip to main content

A lighthearted Python package for funny study tips, excuses, and motivation.

Project description

StudyBuddy — Your (Unhelpfully) Helpful Study Companion

log github events


StudyBuddy is a lighthearted Python package that adds sarcasm, pep talks, and playful structure to your study routine. It gives you randomized study tips, motivational messages, funny excuses, and silly study plans to make your academic life a bit more entertaining.


Installation

From PyPI (recommended):

pip install studybuddy

From source:

git clone https://github.com/swe-students-fall2025/3-python-package-team_cedar.git
cd 3-python-package-team_cedar
pip install -e .

Quick Start (Import & Use)

from studybuddy import study_tip, motivate, excuse, study_plan

# Get a humorous study tip
print(study_tip("physics", "chaotic"))

# Get some motivation (sarcastic or genuine)
print(motivate("sarcastic"))

# Get a funny excuse
print(excuse("homework"))

# Generate a study plan
for step in study_plan(3, "high", seed=4):
    print(step)

API Reference (All Functions)

All functions accept an optional seed parameter for reproducible randomness.

study_tip(topic="math", mood="chaotic", seed=None) -> str

Returns a humorous study tip for the given topic.

Parameters:

  • topic (str): The subject area. Options: "math", "physics", "history". Unknown topics default to "math".
  • mood (str): Currently unused, reserved for future expansion. Default: "chaotic".
  • seed (int | None): Optional seed for reproducible results.

Returns: A string containing a humorous study tip.

Example:

from studybuddy import study_tip

print(study_tip("physics", "chaotic"))
# Output: "If it moves, it's probably physics. If not, hit it again."

print(study_tip("math", seed=42))
# Output: "If it's too complex, assume x = 0. Problem solved."

motivate(style="sarcastic", seed=None) -> str

Returns a motivational or sarcastic message to keep you going.

Parameters:

  • style (str): The tone of motivation. Options: "sarcastic", "genuine". Unknown styles default to "sarcastic".
  • seed (int | None): Optional seed for reproducible results.

Returns: A string containing a motivational message.

Example:

from studybuddy import motivate

print(motivate("sarcastic"))
# Output: "Remember: diamonds are made under pressure. So start panicking."

print(motivate("genuine"))
# Output: "One page at a time — just keep going."

excuse(reason="homework", seed=None) -> str

Returns a funny excuse for various academic mishaps.

Parameters:

  • reason (str): The situation needing an excuse. Options: "homework", "late", "exam". Unknown reasons default to "homework".
  • seed (int | None): Optional seed for reproducible results.

Returns: A string containing a humorous excuse.

Example:

from studybuddy import excuse

print(excuse("homework"))
# Output: "My cat deleted my assignment. She's learning cybersecurity."

print(excuse("exam"))
# Output: "I didn't fail. I just found 99 ways that didn't work."

print(excuse("late"))
# Output: "My Wi-Fi connected to another dimension."

study_plan(hours=3, caffeine_level="high", seed=None) -> list[str]

Generates a humorous study plan with steps.

Parameters:

  • hours (int): Number of hours to plan for. Range: 1–5 (values above 5 are clamped to 5). Default: 3.
  • caffeine_level (str): Caffeine consumption level. Options: "low", "high". When "high", adds coffee-related steps. Default: "high".
  • seed (int | None): Optional seed for reproducible results.

Returns: A list of strings, each representing a study step.

Example:

from studybuddy import study_plan

plan = study_plan(3, "high", seed=4)
for step in plan:
    print(step)
# Output:
# Step 1: Drink more coffee. Make coffee.
# Step 2: Drink more coffee. Open your notes.
# Step 3: Panic productively for 90 minutes.

# With low caffeine
plan = study_plan(2, "low", seed=10)
for step in plan:
    print(step)
# Output:
# Step 1: Reward yourself with a snack break.
# Step 2: Google half the material.

Example Program

See the complete working example at example.py:

from studybuddy import study_tip, motivate, excuse, study_plan

def main():
    print("=== StudyBuddy Demo ===")
    print("\nStudy Tip:", study_tip("physics", "chaotic"))
    print("\nMotivation:", motivate("sarcastic"))
    print("\nExcuse:", excuse("homework"))
    print("\nStudy Plan:")
    for step in study_plan(3, "high", seed=4):
        print(" -", step)

if __name__ == "__main__":
    main()

Run it:

python example.py

Sample output:

=== StudyBuddy Demo ===

Study Tip: If it moves, it's probably physics. If not, hit it again.

Motivation: Remember: diamonds are made under pressure. So start panicking.

Excuse: My cat deleted my assignment. She's learning cybersecurity.

Study Plan:
 - Step 1: Drink more coffee. Make coffee.
 - Step 2: Drink more coffee. Open your notes.
 - Step 3: Panic productively for 90 minutes.

Contributing

We welcome contributions! Follow this workflow to contribute to the project.

Set up your development environment

Clone the repository:

git clone https://github.com/swe-students-fall2025/3-python-package-team_cedar.git
cd 3-python-package-team_cedar

Create a virtual environment:

# Option 1: venv (recommended)
python -m venv .venv
source .venv/bin/activate   # On Windows: .venv\Scripts\activate

# Option 2: Pipenv
pip install pipenv
pipenv install --dev
pipenv shell

Install dependencies:

pip install -U pip
pip install -e . pytest build twine

Run tests

pytest -q

All tests should pass before submitting a pull request.

Build the package

python -m build

This creates distribution files in the ./dist directory.

Publish to PyPI (maintainer only)

twine upload dist/*

Git workflow for new features

  1. Create a feature branch:
git switch -c feat/your-feature-name
  1. Make changes and add tests for any new functionality

  2. Commit your changes:

git add -A
git commit -m "feat(core): add your feature description"
  1. Push to GitHub:
git push -u origin feat/your-feature-name
  1. Open a Pull Request on GitHub
  2. Request a teammate review
  3. After approval, merge into main
  4. Delete your feature branch

Continuous Integration

Every pull request triggers automated testing via GitHub Actions on Python 3.10 and 3.11.

The CI badge at the top of this README shows the current build status.

Workflow file: .github/workflows/event-logger.yml


Team Cedar

Name GitHub
Nicole Zhang @chzzznn
Kylie @kylin1209
Sean Tang @plant445

PyPI Package

https://pypi.org/project/studybuddy-teamcedar/0.8.0/


License

MIT — do cool things responsibly (and sarcastically).

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

studybuddy_teamcedar-0.8.0.tar.gz (27.8 kB view details)

Uploaded Source

Built Distribution

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

studybuddy_teamcedar-0.8.0-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

Details for the file studybuddy_teamcedar-0.8.0.tar.gz.

File metadata

  • Download URL: studybuddy_teamcedar-0.8.0.tar.gz
  • Upload date:
  • Size: 27.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for studybuddy_teamcedar-0.8.0.tar.gz
Algorithm Hash digest
SHA256 46f5f9105585aab95bf02f3cced0a1924f5cc7d27b21dfd2e415c2a726ee4edb
MD5 c09544c949dfa438dd0ad7d37e5ef0b9
BLAKE2b-256 088cc115791b6a22990f7793964a1181a68615852187e5a859353a3a9e5724e4

See more details on using hashes here.

File details

Details for the file studybuddy_teamcedar-0.8.0-py3-none-any.whl.

File metadata

File hashes

Hashes for studybuddy_teamcedar-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c83047ea75dd91576f632f133e78c52cacfdbe4d55c7b88426b16e20adb9bcc9
MD5 5fa3a98b7755fd26315a58ec1d20e2de
BLAKE2b-256 0138b1ca2d5a5a63fa4b0ddc29ac6415b3bc5605ac10e465cfabde2e0b9a5df2

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