Skip to main content

A homelab helper module

Project description

# hhelper

[![pipeline status](https://git.tpage.io/tyler/hhelper/badges/master/pipeline.svg)](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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for hhelper, version 1.0.3
Filename, size File type Python version Upload date Hashes
Filename, size hhelper-1.0.3-py2.py3-none-any.whl (7.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size hhelper-1.0.3.tar.gz (4.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page