Library for retrieving configurations for DKIST services
Project description
A configuration for the loguru logger and base configuration object using pydantic base settings.
It is important that it be the first import to run so the standard logging basicConfig method has an effect.
Features
Stderr output
Intercepted logging from client libraries
Disabled better exceptions for log levels above debug to mitigate secret leaking
Configuration logging with secrets redacted
DKIST Mesh Service configuration parsing
Installation
pip install dkist-service-configuration
Examples
config.py
from dkist_service_configuration.logging import logger
from dkist_service_configuration import MeshServiceConfigurationBase
logger.debug('hello world)
class NewConfiguration(MeshServiceConfigurationBase):
username: str = "me"
password: str = "pass"
new_configuration = NewConfiguration()
new_configuration.log_configurations()
The code above will register the existing loggers, retrieve mesh configuration and custom configuration from the environment and log it while redacting the password.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dkist_service_configuration-4.0.0rc2.tar.gz
.
File metadata
- Download URL: dkist_service_configuration-4.0.0rc2.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e2de56203ec6a1dd1bcb7426ea15d6d4597925b0fab122d3b6de531bc8b580e |
|
MD5 | 48fda111f2074aa96071be688cef2bd2 |
|
BLAKE2b-256 | 2466a12c451adc6c10b06ffb4e1f70ce7b77475ef81c99aa0c15cb4572918c52 |
File details
Details for the file dkist_service_configuration-4.0.0rc2-py3-none-any.whl
.
File metadata
- Download URL: dkist_service_configuration-4.0.0rc2-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d61083fdd5af408d20a1c236d30232b8da9ec84c7ea4cbfb4ecc1c760020f649 |
|
MD5 | 9df579b9a83597acff72a4a90a0b2b70 |
|
BLAKE2b-256 | 67f0368210bad358bc5cc1eea348e309f8a743e8bc3ad0e675ba69da857d1b3b |