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.3.8.tar.gz (3.8 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.3.8-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fstrent_tools-0.3.8.tar.gz
  • Upload date:
  • Size: 3.8 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.3.8.tar.gz
Algorithm Hash digest
SHA256 f9bc70ef15dfff00b308e346b3fcd7cd55ac52e0996f345f2242828bf68ec1d0
MD5 fd46d2d3c2c37e9df6b715062d977794
BLAKE2b-256 5f071670d89695f457f2f7245a7ad8d41cafef1cb43c7c2a6ec3053ff1d38805

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fstrent_tools-0.3.8-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.3.8-py3-none-any.whl
Algorithm Hash digest
SHA256 64404d7ebf028a28737130cbbe717dc202d8994d919d8e9e95da91c67cd6ce5e
MD5 9a6363d5a667d265a94b4341f133de77
BLAKE2b-256 573e6c1a80bc4327399831f71fccb2e5aa22077d445d10b27f1a3579c515fbfa

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