# pytoolkitlib 🛠
pytoolkitlib is a lightweight, zero-dependency Python utility toolkit designed to streamline common development tasks such as logging setup, JSON operations, file hashing, and performance benchmarking.
---
## Features
* **LoggerToolkit**: Quick and simple setup for console and file logging.
* **FileToolkit**: Safe reading and writing of JSON files, along with file hash generation (SHA-256, etc.) for integrity checks.
* **BenchmarkToolkit**: Handy decorators to measure execution time of your functions.
* **Zero Dependencies**: Built entirely using Python standard libraries.
---
## Quick Start
### Installation
Install pytoolkitlib via pip:
pip install pytoolkitlib
Usage Examples
1. Setup Logging
from pytoolkitlib import LoggerToolkit
\# Initialize logger with both console and file output
logger = LoggerToolkit.setup\_logger(name="AppLogger", log\_file="app.log")
logger.info("Application started successfully!")
2. Work with JSON & File Hashes
from pytoolkitlib import FileToolkit
data = {"user": "Alice", "role": "admin"}
\# Write JSON safely
FileToolkit.write\_json("config.json", data)
\# Read JSON safely
config = FileToolkit.read\_json("config.json")
\# Generate file SHA-256 hash
file\_hash = FileToolkit.get\_file\_hash("config.json")
print(f"File SHA-256: {file\_hash}")
3. Measure Function Performance
import time
from pytoolkitlib import BenchmarkToolkit
@BenchmarkToolkit.timer
def process\_data():
  time.sleep(1)
\# Calling the function will automatically log its execution time
process\_data()
\# Output: \[Timer] Function 'process\_data' executed in 1.0005 seconds.
License
This project is open-source and available under the MIT License.
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 pytoolkitlib-0.0.1.tar.gz.
File metadata
- Download URL: pytoolkitlib-0.0.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
581c3522c3ae79a96c26ef9d4dc1d3f388d3448d310c40b9ddd3c9d0fc72f7b1
|
|
| MD5 |
447a757b38ad384f3798001ac27d487c
|
|
| BLAKE2b-256 |
272e089bda84bbd80c4ef92151bb5a0fb9cfc7c743ef847bb8de05deb33b8157
|
File details
Details for the file pytoolkitlib-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pytoolkitlib-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43561876b4d9031423b4649449fdc52ed5ea6ebdfc0aa5804fb0e6186f2fa943
|
|
| MD5 |
65db5ea5d8e3a0766305a62034aa8a5b
|
|
| BLAKE2b-256 |
4fa08f7aa82576633c22214ad69e62e73dbb2db5421a3586290ea42f4d57d7e2
|