A collection of Python utility functions
Project description
FSTrent Tools
A collection of utility functions commonly used in Python scripts and projects, organized into specialized modules.
Installation
pip install fstrent_tools
Modules
The package includes several specialized utility modules:
- tools_convert: Utilities for data type conversion and transformation
- tools_debug: Debugging helpers and troubleshooting utilities
- tools_decorators: Collection of useful Python decorators
- tools_dicts: Dictionary manipulation and advanced operations
- tools_errors: Custom error handling and exception utilities
- tools_eval: Safe evaluation and expression parsing utilities
- tools_files: File system operations and path management
- tools_formatting: Text and data formatting utilities
- tools_hyperlinks: URL and hyperlink manipulation tools
- tools_json: JSON handling, parsing, and manipulation utilities
- tools_logging: Advanced logging setup and management
- tools_object: Object manipulation and introspection utilities
- tools_print: Enhanced console printing and output formatting
- tools_python: Python language helpers and utility functions
- tools_settings: Configuration and settings management
- tools_sounds: Audio file handling and sound processing
- tools_speak: Text-to-speech and voice synthesis utilities
- tools_strings: String manipulation and processing functions
- tools_terminal: Terminal/console interaction utilities
- tools_time: Date, time, and duration handling utilities
- tools_video: Video file processing and manipulation
- tools_voice: Voice recognition and processing utilities
Usage Examples
# Import specific tools
from fstrent_tools.tools_logging import setup_logger
from fstrent_tools.tools_json import load_json, save_json
from fstrent_tools.tools_time import get_timestamp
from fstrent_tools.tools_formatting import format_number
from fstrent_tools.tools_object import AttDict
# Setup logging
logger = setup_logger("my_app")
# JSON operations
data = load_json("config.json")
save_json("output.json", data)
# Time operations
current_time = get_timestamp()
# Formatting
formatted_num = format_number(1234567.89)
# Using AttDict for attribute-style dictionary access
config = AttDict({
'database': {
'host': 'localhost',
'port': 5432,
'name': 'mydb'
},
'api_key': 'secret123'
})
# Access nested values using dot notation
print(config.database.host) # outputs: localhost
print(config.api_key) # outputs: secret123
# Still works like a regular dictionary
print(config['database']['port']) # outputs: 5432
# Modify values using either notation
config.database.name = 'newdb'
config['api_key'] = 'newsecret'
Development
To contribute to this project:
- Clone the repository
- Install development dependencies:
pip install -r requirements.txt - Make your changes
- Submit a pull request
Version Control
This project uses bumpversion for version management. To bump the version:
# For patch updates (0.0.x)
.\gh_push.bat
# Enter 'patch' when prompted
# For minor updates (0.x.0)
.\gh_push.bat
# Enter 'minor' when prompted
# For major updates (x.0.0)
.\gh_push.bat
# Enter 'major' when prompted
License
This project is licensed under the MIT License - see the LICENSE file for details.
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 fstrent_tools-0.3.3.tar.gz.
File metadata
- Download URL: fstrent_tools-0.3.3.tar.gz
- Upload date:
- Size: 533.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eee81ee97770b895433b7ace5d96a34877ebbcf68419895e11f7093d6750e9ec
|
|
| MD5 |
6ca3451b7b1763cc417b6e43e58350fa
|
|
| BLAKE2b-256 |
810b032cbba5bf9d90cadceb4a1bec77879b41f490cbe5b8d6ffa2d99e3b3a01
|
File details
Details for the file fstrent_tools-0.3.3-py3-none-any.whl.
File metadata
- Download URL: fstrent_tools-0.3.3-py3-none-any.whl
- Upload date:
- Size: 29.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0760399a01a0a49e5d6393e736070ae4c74ec133774fca3a69479cda4e9e703
|
|
| MD5 |
3643ce221624a9088665e4bad1d8efa5
|
|
| BLAKE2b-256 |
7181d6df639bc6cbe54b7023301514e4b00ebc10b3ea97db371b39ad2159180a
|