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.
Release files for dkist-service-configuration 4.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dkist_service_configuration-4.4.0.tar.gz | 18.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dkist_service_configuration-4.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.2 kB
Release files / dkist_service_configuration-4.4.0.tar.gz
| Download URL | dkist_service_configuration-4.4.0.tar.gz |
|---|---|
| Size | 18.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ca5af6c2dc63595a58978bfa9af89444b3c2f140bbc3dd4ca4213899e96eb9e
|
|
BLAKE2b-256 checksum How to use checksums |
775400467d2bb87b3581d0ee9055eda0e30abea8c725e72d4898a3f505addd8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / dkist_service_configuration-4.4.0-py3-none-any.whl
| Download URL | dkist_service_configuration-4.4.0-py3-none-any.whl |
|---|---|
| Size | 18.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
49b0c76aded983dc03aaad05c8c417d4c8b8508bdc40a6ea7127faa7856e1e79
|
|
BLAKE2b-256 checksum How to use checksums |
c21a380e42010202dda17ad741e05118c8c4a4725c12b13ffc612631be9ef3f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|