A comprehensive toolkit for GUI applications and system utilities
Project description
Boudy Toolkit
A comprehensive Python toolkit that combines powerful GUI capabilities with system utilities. Built on top of tkinter, this toolkit offers themes, responsive layouts, system utilities, data validation, and advanced widgets out of the box.
Table of Contents
Installation
pip install boudy-toolkit
GUI Components
Basic Application Setup
from boudy_toolkit import initialize, Theme, run
# Initialize with default theme
root = initialize("My App", "800x600", Theme.LIGHT)
# Or use dark theme
root = initialize("Dark App", "800x600", Theme.DARK)
# Start the application
run()
Forms
from boudy_toolkit import create_form
def handle_submit(data):
print(f"Received: {data}")
fields = ["Name", "Email", "Phone"]
form = create_form(
fields=fields,
callback=handle_submit,
title="Registration Form"
)
Data Grid
from boudy_toolkit import create_data_grid
data = [
["John", "john@email.com", "Active"],
["Jane", "jane@email.com", "Inactive"]
]
grid = create_data_grid(
data=data,
headers=["Name", "Email", "Status"],
title="Users List"
)
Charts
from boudy_toolkit import create_chart
# Bar chart
data = [10, 25, 15, 30]
labels = ["Q1", "Q2", "Q3", "Q4"]
chart = create_chart(
data=data,
chart_type="bar",
title="Quarterly Sales",
labels=labels
)
# Pie chart
pie = create_chart(
data=[30, 20, 25, 25],
chart_type="pie",
labels=["Product A", "Product B", "Product C", "Product D"]
)
Menu Bar
from boudy_toolkit import create_menu_bar
def file_open(): print("Opening file...")
def file_save(): print("Saving file...")
def help_about(): print("About dialog")
menu_config = {
"File": [
("Open", file_open),
("Save", file_save),
"-",
("Exit", root.quit)
],
"Help": [
("About", help_about)
]
}
menubar = create_menu_bar(menu_config)
Tabbed Interface
from boudy_toolkit import create_tabbed_interface
def tab1_content(frame):
# Create content for first tab
label = ttk.Label(frame, text="Tab 1 Content")
label.pack()
def tab2_content(frame):
# Create content for second tab
button = ttk.Button(frame, text="Tab 2 Button")
button.pack()
tabs = {
"General": tab1_content,
"Settings": tab2_content
}
tabbed_interface = create_tabbed_interface(tabs)
Dialog Boxes
from boudy_toolkit import create_dialog
# Information dialog
create_dialog("Operation completed!", "info")
# File selection dialog
filename = create_dialog("", "file", "Select File")
# Color picker dialog
color = create_dialog("", "color", "Choose Color")
System Utilities
System Commands
from boudy_toolkit import cmd, cpu_usage, get_public_ip, ping
# Execute system command
cmd("ipconfig")
# Get CPU usage
print(cpu_usage()) # Output: "CPU Usage: 45.2%"
# Get public IP
print(get_public_ip()) # Output: "203.0.113.1"
# Ping host
print(ping("google.com")) # Output: "google.com is reachable."
File Operations
from boudy_toolkit import write_to_file, compress_file
# Write to file
write_to_file("output.txt", "Hello World!")
# Compress file
compress_file("data.txt", "archive.zip")
Screenshot
from boudy_toolkit import screenshot
# Capture screen
screenshot("my_screenshot.png")
Notifications
from boudy_toolkit import send_desktop_notification
# Send notification
send_desktop_notification(
title="Alert",
message="Task completed successfully!"
)
Media Tools
QR Code Generation
from boudy_toolkit import qr_code_generator
# Generate QR code
qr_code_generator(
data="https://example.com",
filename="website_qr.png"
)
Image Processing
from boudy_toolkit import resize_image
# Resize image
resize_image(
input_path="original.jpg",
output_path="resized.jpg",
size=(800, 600)
)
Audio Features
from boudy_toolkit import play_sound, text_to_speech
# Play audio file
play_sound("notification.mp3")
# Convert text to speech
text_to_speech("Welcome to the application")
Data Operations
Database Operations
from boudy_toolkit import Database
# Initialize database
db = Database("app.db")
# Execute query
results = db.execute(
"SELECT * FROM users WHERE active = ?",
params=(True,)
)
Input Validation
from boudy_toolkit import Validator
# Validate email
is_valid = Validator.is_email("user@example.com")
# Validate phone number
is_valid = Validator.is_phone("+1234567890")
# Validate date
is_valid = Validator.is_date("2024-01-15")
File Operations
from boudy_toolkit import file_operations
FileOps = file_operations()
# Save JSON
data = {"name": "John", "age": 30}
FileOps.save_json(data, "user.json")
# Save CSV
data = [["Name", "Age"], ["John", "30"]]
FileOps.save_csv(data, "users.csv")
Utility Functions
Timers
from boudy_toolkit import countdown_timer, run_timer
# Countdown timer
countdown_timer(60) # 60-second countdown
# Stopwatch
run_timer() # Press Enter to start, Ctrl+C to stop
Async Operations
from boudy_toolkit import AsyncTask
def long_running_task():
# Simulating long operation
time.sleep(5)
return "Completed"
def on_complete(result):
print(f"Task {result}")
task = AsyncTask(long_running_task, on_complete)
task.run()
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
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 boudy_toolkit-0.1.2.tar.gz.
File metadata
- Download URL: boudy_toolkit-0.1.2.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e36f75a90834a3878cef65f6548b9b5573791c72e99585e19ca27f0144c27a8
|
|
| MD5 |
74d4e058c90bb54b2de2ed1c3cf5c09f
|
|
| BLAKE2b-256 |
4f5693e52d1dbf508427343fc71f31036c7fdb77a3bc265b08dc1ae8b33575a8
|
File details
Details for the file boudy_toolkit-0.1.2-py3-none-any.whl.
File metadata
- Download URL: boudy_toolkit-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7bc2eaadc6c9497f50d7254311ae73584cfd24396d1500a4a0e3b2048744525
|
|
| MD5 |
ab1b272acffc7b78068ae9f828958257
|
|
| BLAKE2b-256 |
de83c38807e8144ac5a4ed7cc31710de840f1113d6cb38c0fcfb688aecb42601
|