Holytools
A collection of general utilities in various very general areas that aim for simplicity in use. Functionalities include:
- object serialization -> holytools.abstract.serialization
- fileIO and mock files -> holytools.file
- configuration management -> holytools.configs
- file system navigation and management -> holytools.fsys
- task/event scheduling -> holytools.events
- hardware interaction -> holytools.hardware
- web search/scraping -> holytools.web
- command line interfaces -> holytools.userIO
Setup
Latest release from PyPI:
pip install holytools
OR: Most recent commit from github:
pip install holytools @ git+https://git@github.com/Somerandomguy10111/holytools.git
Examples
- holytools.fsys -> Zip a file or folder or get resource information
# fsys
from holytools.fsys import FsysNode
node = FsysNode(path='/home/daniel/Drive/Desktop/fluent_python.pdf')
zip_bytes = node.get_zip()
last_modified : float = node.get_epochtime_last_modified()
file_size_mb : float = node.get_size_in_MB()
- holytools.config -> set/get configs from a config file or from unix password manager "pass"
# config
from holytools.configs import FileConfigs, PassConfigs
configs = FileConfigs(config_fpath='~/myconfigs.ini')
key = 'plot_images'
configs.set(key=key, value=False)
plot_images : bool = configs.get(key=key) # False
pass_configs = PassConfigs()
secret_key = pass_configs.get(key='secret_key')
- holytools.abstract -> Save/load
# serialization
from holytools.abstract import Picklable
class SomeClass(Picklable):
def __init__(self, s : str, x : float):
import uuid
self.s = s
self.x = x
self.uuid = uuid.uuid4()
obj = SomeClass(s='hello there', x =2.3)
serialized_obj = obj.to_str()
loaded_obj = SomeClass.from_str(s=serialized_obj)
print(obj.__dict__) # {'s': 'hello there', 'x': 2.3, 'uuid': UUID('79b489be-3871-4da0-ade4-665097b9bf42')}
print(loaded_obj.__dict__) # {'s': 'hello there', 'x': 2.3, 'uuid': UUID('79b489be-3871-4da0-ade4-665097b9bf42')}
Metadata
Release files for holytools 0.9.18
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| holytools-0.9.18.tar.gz | 860.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| holytools-0.9.18-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.7 MB
Release files / holytools-0.9.18.tar.gz
| Download URL | holytools-0.9.18.tar.gz |
|---|---|
| Size | 860.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be2d6d4aab087ac50a7e93f56df336b7b7a77a35afdd114597505e936a30caae
|
|
BLAKE2b-256 checksum How to use checksums |
89a8c01462c21bfe6c1c5219bba4d6a2a5f34910e05a38ad55272c802f6ad27b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / holytools-0.9.18-py3-none-any.whl
| Download URL | holytools-0.9.18-py3-none-any.whl |
|---|---|
| Size | 873.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cfa2bb6a877aa9e72cb301d00130e6feff0c6232c7a0d34046e1ae9c901ea154
|
|
BLAKE2b-256 checksum How to use checksums |
6fdb70ac92eadb954320a23acaf347819603817d14f5d268291d0216e50a7b02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|