TRC (Total Resource Control) is a comprehensive Python package for enhancing Python's capabilities with utility functions. It offers robust tools for data operations (manipulation, augmentation, processing), specialized functionalities for character sets/patterns, and an innovative agent-based framework to streamline complex workflows and automate tasks, making code more concise, readable, and efficient across various development stages.
Project description
💡 TRC - Total Resource Control
Master Your Python Projects with trc!
TRC (Total Resource Control) is your all-in-one Python toolkit designed to empower developers with a vast collection of practical and efficient utility functions. From streamlining routine tasks to handling complex data manipulations, trc helps you write cleaner, more concise, and robust code, accelerating your development workflow.
🚀 Get Started in Seconds!
Installing trc is a breeze. Just open your terminal and run:
pip install trc
✨ Why trc?
- Comprehensive Toolkit: A single package for diverse needs – connectivity, math, file handling, string operations, advanced data processing and complex AI-Agent's
- Boost Productivity: Simplify complex tasks with easy-to-use functions, letting you focus on your core logic.
- Clean & Efficient Code: Write less code for more functionality, leading to better readability and maintainability.
- Reliable & Tested: Robust tools built for real-world scenarios.
📚 Dive into trc's Power Features
trc is organized into intuitive categories, ensuring you find exactly what you need, when you need it.
🌐 Connectivity & System Insights
Seamlessly interact with your network and gain deep insights into your system:
- Web Operations: Download files and images from URLs, and check network/URL reachability.
- System Diagnostics: Retrieve detailed system information including IP/MAC addresses, CPU details, RAM usage, and OS specifics. Monitor system memory usage (percentage, total GB, used GB).
- Clipboard Control: Effortlessly copy and retrieve text from the system clipboard.
- Network Utilities: Ping network hosts to check reachability and measure response times.
🔢 Mathematical Marvels
Unleash a powerful suite of mathematical functions for various computations:
- Prime Number Operations: Find the Nth prime number, or quickly check if any number is prime.
- Sequence Generators: Generate Fibonacci numbers and determine if a number belongs to the sequence.
- Number Theory Essentials: Factorize numbers, compute Greatest Common Divisor (GCD) and Least Common Multiple (LCM), find all divisors, and identify perfect numbers.
- Fundamental Calculations: Compute factorials, binomial coefficients, digit sums, and determine if a number is a power or a perfect square. Calculate mean and median of numerical data.
- Geometric Helper: Calculate sides of a right-angled triangle using the Pythagorean theorem.
🗄️ File & Data Streamlining
Simplify your file management and data serialization tasks:
- JSON Handling: Convert Python dictionaries to JSON files and vice-versa with ease.
- File Operations: Copy files across your system efficiently. Retrieve detailed metadata for files and directories.
- Directory Structure: Read and represent directory structures programmatically.
⚡ Functional Enhancements
Elevate your Python functions with powerful decorators and execution utilities:
- Caching: Boost performance by intelligently caching function results.
- Timing: Accurately measure function execution times.
- Repetition: Run functions multiple times for stress testing or iterative processes.
- Retries: Implement robust error handling with automatic function retries on failure.
🔡 Variable & String Wizardry
Transform and process strings and various data types effortlessly:
- Text Cleaning: Remove or retain specific characters, remove accents, and truncate text.
- Data Aggregation: Merge lists or dictionaries, eliminate duplicates, and flatten nested lists.
- Random Generation: Create unique random strings for various purposes.
- Pattern Matching: Check for partial or complete element presence within collections.
- Formatting & Conversion: Format durations, reverse objects (strings, lists), and convert text to URL-friendly slugs.
- Text Analysis: Count words and characters, detect various case styles, split text into individual words, and extract unique words.
- Case Transformation: Seamlessly convert text between
snake_case,kebab-case,PascalCase,camelCase,CONSTANT_CASE, andTitle Case. Detect case styles (e.g., snake_case, camelCase). - Palindrome Checks: Verify if a string or sequence is a palindrome.
- Dynamic Variable Management: Manage variables dynamically within your code (get and set).
🖼️ Advanced Data & Image Processing
Specialized tools for handling images and large datasets with HDF5:
- Image Augmentation: Apply a wide array of transformations to images (rotation, scaling, mirroring, blurring, noise, contrast, brightness, resizing, inversion) for data enhancement or creative effects.
- Image Analysis: Calculate similarity between images and blend multiple images together.
- HDF5 Integration: Efficiently read and write image and label data to and from HDF5 files, ideal for machine learning classification tasks.
🧠 The trc Agent: Your Intelligent Assistant (Total Resource Control!)
At the core of trc's advanced capabilities lies its integrated AI Agent, truly embodying the "Total Resource Control" philosophy. This powerful agent is designed to interact with its environment and execute complex tasks autonomously, leveraging a diverse set of operational capabilities:
- Interactive Problem-Solving: The agent can dynamically engage in dialogues to seek clarification or gather necessary input, ensuring tasks are precisely aligned with user intent.
- Comprehensive Resource Management: It possesses extensive control over digital resources, including sophisticated handling of data structures, file systems, and system-level operations for advanced automation.
- Dynamic Knowledge Integration: The agent can acquire and process information from vast knowledge bases, enabling it to research and integrate relevant insights into its tasks.
- Versatile Data Handling: Capabilities to ingest and process a wide array of data formats, from traditional files to complex multimedia and large-scale information structures, for analysis and manipulation.
- Adaptive Intelligence: With robust internal mechanisms for persistent memory and learning, the agent can store and retrieve information, allowing for continuous improvement and more sophisticated decision-making over time.
This intelligent agent transforms trc from a mere collection of utilities into a dynamic, problem-solving entity, ready to tackle challenges that require adaptive decision-making and broad operational capabilities.
🎯 Quick Usage Examples
Here's a glimpse of what you can do with trc:
# Not finished yet...
👋 Contribute & Make trc Even Better!
We warmly welcome contributions from our community! If you discover a bug, have an idea for an improvement, or want to add an exciting new feature, please don't hesitate to:
- Open an issue to report bugs or suggest enhancements. # No finished yet
- Submit a pull request with your code contributions. # No finished yet
Your input is invaluable in making trc a truly indispensable tool for everyone!
📄 License
This project is proudly licensed under the MIT License. For full details, please see the LICENSE file in the package.
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 Distributions
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 trc-1.3-py3-none-any.whl.
File metadata
- Download URL: trc-1.3-py3-none-any.whl
- Upload date:
- Size: 37.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76abdf5d2e4cfb4f10f7df003d75334f6df0e23195549d95beb9ea2ca5a5d126
|
|
| MD5 |
913217cf50934712a41a4ee81a4bcfb2
|
|
| BLAKE2b-256 |
9a9004e1ef1bacad31b67275bf409565a717f769827bab456971a7e61843df1b
|