panaetius

API

The following is availble by importing the module:

import panaetius

panaetius.CONFIG

panaetius.CONFIG provides an instance of panaetius.config.Config

panaetius.set_config()

Conveniently provides panaetius.library.set_config()

Use in your module/script with:

panaetius.set_config(panaetius.CONFIG, 'aws.secret_key', str, mask=True)

panaetius.CONFIG.aws_secret_key

Conveniently provides access to all attributes that have been declared with panaetius.library.set_config():

my_secret_key = panaetius.CONFIG.aws_secret_key

panaetius.logger

panaetius.logger provides a logger instance already formatted with a nice json output.

panaetius.logger.info('some logging message')

This gives a logger output of:

{
    "time": "2020-01-13 23:07:17,913",
    "file_name": "test.py",
    "module": "test",
    "function":"<module>",
    "line_number": "33",
    "logging_level":"INFO",
    "message": "some logging message"
}