Skip to main content

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:

  1. Clone the repository
  2. Install development dependencies: pip install -r requirements.txt
  3. Make your changes
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fstrent_tools-0.5.0.tar.gz (513.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fstrent_tools-0.5.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file fstrent_tools-0.5.0.tar.gz.

File metadata

  • Download URL: fstrent_tools-0.5.0.tar.gz
  • Upload date:
  • Size: 513.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for fstrent_tools-0.5.0.tar.gz
Algorithm Hash digest
SHA256 63fcec4f43845c42e16f6db3e01cbd72410722386f39122972d320a6c11f50e9
MD5 6015b7945820b4887d62bb3da09b4905
BLAKE2b-256 1f924748e3b50225a90c7ad7367319260ad3715ad5487fb986bccbdc8504276a

See more details on using hashes here.

File details

Details for the file fstrent_tools-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: fstrent_tools-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for fstrent_tools-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 94893c0b03afd45e56109b44b1daa1758ca1af3fbb7d56f378bd14b802b82b3a
MD5 8d79f76f514167e61183ef7211dc147d
BLAKE2b-256 05fd7365f5359dfd2a08d5c2f4cd43ddbc9b57aafc89d4d2fede4db3a22d68d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page