Benny Bean Utils Package
Description
This package targets to offer basic utilities for my personal projects.
Installation
To build the package :
py -m pip install --upgrade build
py -m build
To upload the package to PyPI:
py -m pip install --upgrade twine
py -m twine upload dist/*
To install the package:
py -m pip install benny_bean_utils
Utilities
Date Utilities
DateFormatter
A class for formatting and parsing dates according to a specified format.
from datetime import datetime
from benny_bean_utils.date.date_formatter import DateFormatter
# Initialize with default format (%d/%m/%Y) or custom format
formatter = DateFormatter()
# or
formatter = DateFormatter("%Y-%m-%d")
# Format a date
date = datetime.now()
formatted_date = formatter.format_date(date) # "12/06/2025" with default format
# Parse a date string
date_obj = formatter.parse_date("12/06/2025") # Returns a datetime object
DateObtainer
A utility class for obtaining various date-related information.
from benny_bean_utils.date.date_obtainer import DateObtainer
# Get today's date
today = DateObtainer.today_date() # Returns datetime object
# Get yesterday's date
yesterday = DateObtainer.yesterday_date() # Returns datetime object
# Get current week day (0=Monday, 6=Sunday)
weekday = DateObtainer.current_week_day() # Returns int (0-6)
# Get current week number
week_num = DateObtainer.week_number() # Returns int
# Get days remaining before next week
days_to_next_week = DateObtainer.remaining_days_before_next_week() # Returns int
DateTester
A class to test date-related functionalities.
from datetime import datetime
from benny_bean_utils.date.date_tester import DateTester
# Check if a date is within X days from today
date = datetime.now()
is_within_days = DateTester.is_date_in_less_than_x_days(date, 5) # Returns boolean
# Check if a date is today
is_today = DateTester.is_today(date) # Returns boolean
String Utilities
StringFormatter
Utility class for string formatting operations.
from benny_bean_utils.string.string_formatter import StringFormatter
# Convert text to snake_case
snake_case = StringFormatter.get_snake_case_of_text("Hello World") # Returns "hello_world"
text_with_accents = StringFormatter.get_snake_case_of_text("Café au lait") # Returns "cafe_au_lait"
Metadata
Release files for benny-bean-utils 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| benny_bean_utils-1.0.0.tar.gz | 7.6 kB | Without provenance | Details for benny_bean_utils-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| benny_bean_utils-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for benny_bean_utils-1.0.0-py3-none-any.whl |
Total release size: 13.5 kB
Release files / benny_bean_utils-1.0.0.tar.gz
| Download URL | benny_bean_utils-1.0.0.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d2610af7c365d51e972105a292b611d83a9703cc3d718c4e441af0720728b8c7
|
|
BLAKE2b-256 checksum How to use checksums |
a4f64cbe9dde1cfc03c2827f8b0bb6c5384d8bafe21c9220d01473f33cb15c4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / benny_bean_utils-1.0.0-py3-none-any.whl
| Download URL | benny_bean_utils-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
77d1e951c32cce6e47341e3e91dcb187d9da548fede528e802d725e19eae068e
|
|
BLAKE2b-256 checksum How to use checksums |
5ea8b8f290e9f2645498339f4c6642f7b26c9e3a850e5d5e0ad5737adccce4b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Security for benny-bean-utils 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.