A homelab helper module
Project description
# hhelper
[](https://git.tpage.io/tyler/hhelper/commits/master)
homelab helper script for use in my other projects
### Requirements
- hvac - Hashicorp Vault API Client
- slixmpp - Async XMPP client
### Currently supported helper functions:
- vault_test(address, entity, token) - Tests a given vault server to ensure it is initialized, unsealed, and that the token provided is valid. Returns False if one of those criterion is not true
- get_vault_secret(secret, cache=True) - Retrieves a secret from vault using the local cache file if available. The secret format should be secret/foo, and the function returns False if vault is not ready or the secret cannot be retrieved
- send_xmpp(room, message, file=None) - Sends an XMPP message to a specified room with an optional file attachment
- send_log_message(room, level, message) - A wrapper for send_xmpp that prefixes the message from a list of log levels for easier readability
- log(message, level, log_file) - Functionally the same to send_log_message() but instead of sending the message via XMPP, it logs it to a file on disk
### Notes
- Set HHELPER_CONFIG to a valid hhelper.json config file to override the default /opt/hhelper.json
Project details
Release history Release notifications
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size hhelper-1.0.0-py2.py3-none-any.whl (7.7 kB) | File type Wheel | Python version py2.py3 | Upload date | Hashes View hashes |
Filename, size hhelper-1.0.0.tar.gz (4.9 kB) | File type Source | Python version None | Upload date | Hashes View hashes |
Close
Hashes for hhelper-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fab7bae4ed278366620212e6681f0afe036d0d4866d798e3aabc283921d0e192 |
|
MD5 | d2108002567ad5b8c2cca8d456d91a07 |
|
BLAKE2-256 | 6bcaa21f475c11207e9592e27c7494e29a5262e89306ced0deb25d8b6c47f8b4 |