PyPI package designed to make development in Python easier.
Project description
pythonbundle
pythonbundle is a versatile and lightweight collection of Python utility scripts and classes designed to accelerate development. It provides simplified interfaces for common programming tasks ranging from data structure manipulation, cryptography, string validation, and type conversions, to handling SQLite databases, Excel files, and sorting algorithms.
📦 Features
pythonbundle contains several distinct modules to help keep your codebase clean and readable:
🛡️ Validation (Check)
A robust validation class to simplify standard string and format checks.
- Email formatting and customizable domain validation.
- Validates Philippine mobile numbers (+639 / 09).
- Check for spaces, symbols, and pure numerical strings.
🔐 Cryptography (Cipher)
A basic cryptography class to implement classic cipher techniques.
- Transposition Cipher
- Giovanni Cipher
- Keyword Cipher
- Caesar Cipher
🔄 Data Conversion (Convert)
Effortless type casting and data encoding.
- Hex, Binary, and Base64 encoding/decoding.
- String reversal and byte-array conversions.
- Quick casting for Int, Float, Double, and Long.
📚 Data Structures
Custom implementations for improved data manipulation.
Dictionarily: An enhanced Dictionary object with built-in sorting (alphabetical and numerical-first).Memory: A clean, object-oriented list/array wrapper to handle storage, indexing, and removal.Stackily: A classic Stack implementation (push,pop,peek,is_empty,size).Node: A lightweight binary tree node implementation.
🗄️ Database Management (EasySQL)
A simplified wrapper around Python's built-in sqlite3.
- Create tables with ease by passing lists of dictionaries.
- Insert, delete, and clear records directly via Python dictionaries.
- Fetch and print table values seamlessly.
📊 Excel Operations
A wrapper for openpyxl allowing for extremely fast Excel file data manipulation.
- Read and write to specific columns across single or multiple sheets.
- Skip header rows easily using
skip_rows. - Zero-hassle reading/writing to entire column letters (e.g., Column 'A').
🗂️ File Handling (SimpleFileHandler)
Static methods to rapidly read(), write(), and append() to text files using utf-8 encoding.
🧹 Sorting Algorithms
A massive suite of sorting algorithms available as quick plug-and-play functions.
- Quick Sort, Merge Sort, Heap Sort, Selection Sort, Insertion Sort, Bubble Sort.
- Advanced/Niche Sorts: Tim Sort, Intro Sort, Cocktail Shaker Sort, Shell Sort, Pigeonhole Sort, Bead Sort, and even Bogo Sort!
🚀 Installation
pip install pythonbundle
Dependencies
The package largely uses Python's standard library (e.g., sqlite3, math, re, base64). However, the Excel operations module requires:
openpyxlunidecode
💻 Quick Usage Examples
1. Simple SQLite Database Queries (EasySQL)
from pythonbundle import EasySQL
db = EasySQL()
# Create a database table
db.create_table("users_db", "employees",[{"first_name": "text"}, {"last_name": "text"}])
# Insert data
db.insert_to_table("users_db", "employees", [{"first_name": "John"}, {"last_name": "Doe"}])
# Fetch values
records = db.get_table_values("users_db", "employees")
print(records)
2. Validating Phone Numbers & Emails (Check)
from pythonbundle import Check
# Validate Philippine Phone Numbers
is_valid = Check.is_a_valid_philippine_mobile_number("+639123456789")
print(is_valid) # True
# Validate Emails with strict domain rules
Check.Email.add_valid_domain_name("gmail")
Check.Email.add_valid_domain_extension("com")
print(Check.Email.is_valid("user@gmail.com")) # True
3. File Handling (SimpleFileHandler)
from pythonbundle import SimpleFileHandler
# Write, Append, and Read
SimpleFileHandler.write("log.txt", "Process started.\n")
SimpleFileHandler.append("log.txt", "Process finished.\n")
print(SimpleFileHandler.read("log.txt"))
4. Text Encryption (Cipher)
from pythonbundle import Cipher
encrypted = Cipher.caesar_cipher("HELLO WORLD", shift=3)
print(encrypted) # KHOOR ZRUOG
5. Sorting Array Data
from pythonbundle import quicksort, merge_sort
array = [5, 2, 9, 1, 5, 6]
print(quicksort(array)) #[1, 2, 5, 5, 6, 9]
🤝 Contributing
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
📝 License
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
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 pythonbundle-1.3.1.tar.gz.
File metadata
- Download URL: pythonbundle-1.3.1.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2803f96e6d9484b5ef572cc89c4ae2a5cf70babe52054a3f2f8ae52f4eb6fff1
|
|
| MD5 |
3b8c7e6a7e40f11839e2dee714426363
|
|
| BLAKE2b-256 |
23122188e5ba5f3043eeeba6bd770040153065d9afce71cb6720b6fae2305bfa
|
Provenance
The following attestation bundles were made for pythonbundle-1.3.1.tar.gz:
Publisher:
build_python_package.yml on isaiahnoelpulidosalazar/isaiahnoelpulidosalazar.github.io
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pythonbundle-1.3.1.tar.gz -
Subject digest:
2803f96e6d9484b5ef572cc89c4ae2a5cf70babe52054a3f2f8ae52f4eb6fff1 - Sigstore transparency entry: 1524471528
- Sigstore integration time:
-
Permalink:
isaiahnoelpulidosalazar/isaiahnoelpulidosalazar.github.io@5bcd8f5238a0f11d669a4684fb8e834a6ea526ec -
Branch / Tag:
refs/heads/main - Owner: https://github.com/isaiahnoelpulidosalazar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_python_package.yml@5bcd8f5238a0f11d669a4684fb8e834a6ea526ec -
Trigger Event:
push
-
Statement type:
File details
Details for the file pythonbundle-1.3.1-py3-none-any.whl.
File metadata
- Download URL: pythonbundle-1.3.1-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aef8616484c427024fbfe201b7978cb6861c54af76b3a2ba50854619bb2753f6
|
|
| MD5 |
d51ba27827b11a9aeab48814225fb91c
|
|
| BLAKE2b-256 |
c3cca722698d77520806510e73a656ddbaf1c1246bce0428ee2a577c3a23f8d0
|
Provenance
The following attestation bundles were made for pythonbundle-1.3.1-py3-none-any.whl:
Publisher:
build_python_package.yml on isaiahnoelpulidosalazar/isaiahnoelpulidosalazar.github.io
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pythonbundle-1.3.1-py3-none-any.whl -
Subject digest:
aef8616484c427024fbfe201b7978cb6861c54af76b3a2ba50854619bb2753f6 - Sigstore transparency entry: 1524471559
- Sigstore integration time:
-
Permalink:
isaiahnoelpulidosalazar/isaiahnoelpulidosalazar.github.io@5bcd8f5238a0f11d669a4684fb8e834a6ea526ec -
Branch / Tag:
refs/heads/main - Owner: https://github.com/isaiahnoelpulidosalazar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_python_package.yml@5bcd8f5238a0f11d669a4684fb8e834a6ea526ec -
Trigger Event:
push
-
Statement type: