A collection of common utility functions and scripts
Project description
Common Utils
A collection of common utility functions and scripts for various tasks including:
- File operations
- HTTP requests handling
- Image downloading
- Shell script execution
- Task completion management
- Machine wake functionality
- WebSocket listening
Installation
pip install thetemani-common-utils
Usage
from common_utils import file_utils, http_wrapper, image_downloader
# File operations
result = file_utils.read_file("path/to/file.txt")
file_utils.write_file("path/to/output.txt", "content")
# HTTP requests
response = http_wrapper.make_request("https://api.example.com/data")
# Image downloading
image_downloader.download_image("https://example.com/image.jpg", "local_image.jpg")
# Shell script execution
from common_utils import shell_scripts_handler
shell_scripts_handler.execute_script("kill-process-at-port.sh", ["8080"])
# WebSocket listening
from common_utils import web_socket_listener
listener = web_socket_listener.WebSocketListener("ws://example.com")
await listener.connect()
Features
- File Utils: Easy file reading, writing, and manipulation
- HTTP Wrapper: Simplified HTTP request handling
- Image Downloader: Efficient image downloading with retry logic
- Shell Scripts Handler: Execute shell scripts with parameters
- Task Completion: Async task completion management
- Wake Machine: Remote machine wake functionality
- WebSocket Listener: Async WebSocket communication
Requirements
See requirements.txt for a list of dependencies.
License
MIT License
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
File details
Details for the file thetemani_common_utils-0.1.2.tar.gz.
File metadata
- Download URL: thetemani_common_utils-0.1.2.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2536374254d693a12c5834947d389654b478f6d5b4efa8f5c56a18befdd11fe
|
|
| MD5 |
08df404f38e5ebf5cd626b6b43dd923f
|
|
| BLAKE2b-256 |
6a6a44286549121d49e59a3ef100eb6e57c5dca947103c46184359ff486d77a3
|
Provenance
The following attestation bundles were made for thetemani_common_utils-0.1.2.tar.gz:
Publisher:
release.yml on Omer-hadad-s-Projects/common
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thetemani_common_utils-0.1.2.tar.gz -
Subject digest:
f2536374254d693a12c5834947d389654b478f6d5b4efa8f5c56a18befdd11fe - Sigstore transparency entry: 583408012
- Sigstore integration time:
-
Permalink:
Omer-hadad-s-Projects/common@fe8628b9b8dca5d7e6e01a26f74811b2ce1ba9fe -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Omer-hadad-s-Projects
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fe8628b9b8dca5d7e6e01a26f74811b2ce1ba9fe -
Trigger Event:
push
-
Statement type: