A Python package that lets users generate festive birthday-themed visuals.
Project description
The pybirthday Package
pybirthday is a Python package that lets users generate festive birthday-themed visuals!
insert PyPI link here
Currently, the package offers four functions:
- cake(): returns a birthday cake with a personalized name and a custom message.
- Syntax:
pybirthday.cake(name, words) - Parameters:
name(optional): A string (up to 15 characters) to be displayed on the cake. If no name is provided or invalid, the cake will display a blank space.words(optional): A string with a custom message to be printed below the cake. Defaults to "Hope all your birthday wishes come true!"
- Syntax:
- candle(): returns an image of a candle from various styles.
- Syntax:
pybirthday.candle(style) - Parameter:
style: Optional. Values of 0-4 each specify a candle style. If out of range, style #4 is returned. Defaults to random.
- Syntax:
- balloon(): returns an image of birthday balloons from various styles.
- Syntax:
pybirthday.balloon(style) - Parameter:
style: Optional. Specifies a balloon style. Defaults to random.
- Syntax:
- teddy(): returns a cute teddy bear bringing you a birthday greeting!
- Syntax:
pybirthday.teddy(age, name) - Parameters:
age: Optional. Includes age in the greeting. Specify in oridinal format (i.e "20th, "2nd"). Can take integers or strings of no more than 10 characters.name: Optional. Includes name in the greeting. Can take strings of no more than 10 characters.- Invalid parameters are ignored!
- Syntax:
Installation
Install the package via pip:
pip install pybirthday
Usage
from pybirthday import cake, candle, balloon, teddy
mycake = cake("Alice", "Happy 20th Birthday!")
print(mycake) #prints cake with "Alice" written on cake, and "Happy 20th Birthday!" at the bottom
myteddy = teddy("20th", "Bob")
print(myteddy) #prints teddy bear saying "HAPPY 20TH BIRTHDAY BOB"
mycandle_1 = candle()
mycandle_2 = candle(2)
print(mycandle_1) #prints a random candle
print(mycandle_2) #prints candle style #3
myballoon_1 = balloon()
myballoon_2 = balloon(2)
print(myballoon_1) #prints random balloons
print(myballoon_2) #prints balloon style #3
How to contribute to this project
- Fork this repository and then clone it to your local machine:
git clone https://github.com/software-students-spring2025/3-python-package-helloworld cd 3-python-package-helloworld
- Set up a virtual environment
python -m venv venv source venv/bin/activate # On macOS/Linux venv\Scripts\activate # On Windows
- Build the package
pip install build python -m build
Testing
Unit tests are included within the tests directory. To run these tests:
- Install pytest into the virtual environment, e.g. pipenv install pytest
- Run the tests from the main project directory:
python -m pytest
Team
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pybirthday-0.1.1.tar.gz.
File metadata
- Download URL: pybirthday-0.1.1.tar.gz
- Upload date:
- Size: 47.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a2c85b478fa3379deaf9ebb766e67b8825b02f8d234d13936463d638f986fa0
|
|
| MD5 |
7edfe255ed289e27696d50abc223e857
|
|
| BLAKE2b-256 |
804396db92767cf6d977326bdf656002f6b6ba553ff8fe36ae159edb3ca0a9d5
|
File details
Details for the file pybirthday-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pybirthday-0.1.1-py3-none-any.whl
- Upload date:
- Size: 31.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97dc85c53ba36be36c5cc67c0ca0cb27c71abf67d787edd8e9f61abc13860cea
|
|
| MD5 |
0f90f3264357d84d2b410acbfd790d3d
|
|
| BLAKE2b-256 |
a4203e172bbf37d7dd44e6039539ed09f4f3f95506eca4a57681c7c2f1e88863
|