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.6.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.6-py3-none-any.whl (38.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: joytide-0.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 5734a58e3732c2d3c864cb6977fd3e28d348428f579fad78a14ec88585c568d9
MD5 a6d1747bdb5ebb5736b6b7c65f9c479d
BLAKE2b-256 aa3144b008561c38174ed363843ff106c30f23f1b44a69e875058d2d805e72f1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: joytide-0.0.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 99254e1b74b6b31ccf803241c5b23c4817fcc21c8b650e489347033c398813cd
MD5 8a22a7c5fb66a5d4370f1290c5cb5e60
BLAKE2b-256 729f659126b1c88ddefaa566ee9bb54173809314e6a3576a2c19750474c1fa59

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