Skip to main content

A fun Python package by team_riptide with random playful helpers.

Project description

CI / CD
PyPI: https://pypi.org/project/joytide/

joytide

joytide is a small python package with random fun helpers to help de-stress after hours of serious coding. each function can be visually changed with different inputs. the main way to use it is the CLI.

team members

install

requires python 3.10 or higher

pip install joytide
# if pip is not on PATH:
python3 -m pip install joytide
# windows:
py -m pip install joytide

CLI

Banner

print an ASCII banner.

usage

joytide banner TEXT [--border "*" ] [--padding 1] [--align left|center|right]
# if console script isn't on PATH:
python3 -m joytide banner TEXT --border "#" --padding 2 --align right
py -m joytide banner "team_riptide"   # windows

examples

joytide banner "hello"
joytide banner "team_riptide" --border "##"
joytide banner "left"  --padding 2 --align left
joytide banner "right" --border "<>" --align right

Confetti

Create a colorful confetti animation right in your terminal — great for celebrating test passes, merges, or just taking a break.

Usage

joytide confetti [--width WIDTH] [--height HEIGHT] [--n-particles N]
                 [--spawn-time SECONDS] [--gravity VALUE] [--wind VALUE]

# If console script isn't on PATH:
python -m joytide confetti --width 60 --height 15 --spawn-time 3.0
py -m joytide confetti --n-particles 200 --gravity 0.02  # Windows

Options

Flag Description Default
--width number of columns in the frame 40
--height number of rows 12
--n-particles maximum total number of confetti pieces that can appear 120
--spawn-time seconds to keep spawning new confetti before they stop 2.0
--gravity downward acceleration 0.03
--wind horizontal drift per frame 0.01

Examples

joytide confetti
joytide confetti --width 80 --height 20 --n-particles 200 --spawn-time 3.5
joytide confetti --gravity 0.015 --wind 0.005  # slower, smoother motion
joytide confetti --width 30 --height 10 --n-particles 40  # mini version

Art

Print ASCII art with a chosen theme and size.

Usage

joytide art [--theme animal|nature|tech|random] [--size small|large]
# if console script isn't on PATH:
python3 -m joytide art --theme animal --size large
py -m joytide art --theme tech  #windows

examples

joytide art
joytide art --theme animal
joytide art --theme nature --size large
joytide art --theme tech --size small
joytide art --theme random --size large

2048

Play the game 2048 in your terminal

Usage

joytide 2048 [--size SIZE] [--prob PROB] [--winning-tile TILE]
# if console script isn't on PATH:
python3 -m joytide 2048 --size 5 --prob 0.3 --winning-tile 4096
py -m joytide 2048   # windows

Options

  • --size: Board size (default: 4, must be > 1)
  • --prob: Probability of spawning a 4 tile (default: 0.25, range: 0-1)
  • --winning-tile: Target tile value to win (default: 2048)

examples

joytide 2048
joytide 2048 --size 5
joytide 2048 --size 3 --prob 0.5 --winning-tile 512

Race

Race 2 or more players!

Usage

joytide race Mario Peach Yoshi
joytide race "Fast Car" "Zoomies" --delay 0.15 # to make the race slower
joytide race Me You --width 50 # change track width

example program for all functions

to run it:

python3 demo.py
# windows:
py demo.py
# if you're using pipenv:
pipenv run python3 demo.py

how to contribute

we use pipenv for development.

python3 -m pip install --user pipenv
pipenv install --dev
pipenv install -e .
pipenv run python3 -m pytest -v

build the package manually if needed:

pipenv run python3 -m build .

format code with Black:

pipenv run black .

testing

each function should have tests for a normal case, an edge case, and an invalid input case.

pipenv run python3 -m pytest -v

CI / CD

  • code is formatted with Black for consistent style
  • pull requests run tests on python 3.11 and 3.12
  • merges to main build the package and publish to PyPI using twine via GitHub Actions (pypa/gh-action-pypi-publish)

configuration

no environment variables or secret config files are required. no database or starter data is needed. works on mac, windows, and linux.

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

joytide-0.0.7.tar.gz (55.2 kB view details)

Uploaded Source

Built Distribution

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

joytide-0.0.7-py3-none-any.whl (38.4 kB view details)

Uploaded Python 3

File details

Details for the file joytide-0.0.7.tar.gz.

File metadata

  • Download URL: joytide-0.0.7.tar.gz
  • Upload date:
  • Size: 55.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for joytide-0.0.7.tar.gz
Algorithm Hash digest
SHA256 1dc51ed3acd0f5f87a678a895352217d7157f3a3e3134540f4c963f22195133a
MD5 ce3975fb48d63c09e56b16a8286c224f
BLAKE2b-256 69392e558da55c3b1eaf1005317a948f67f306a3f5bdadbbf817ee00432b56a7

See more details on using hashes here.

File details

Details for the file joytide-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: joytide-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 38.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for joytide-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b2ccbfa74fa9fbac8e1cc994cf626b5533961d44b5967192a07e7af5966ac404
MD5 4ef6ec869ec76e9d752f9fcbf551763f
BLAKE2b-256 53af35d1d4af2bf706e3ed7a1c44fd239529279b672ee0166ebb791bcbdeaff8

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