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.
Metadata
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 | Provenance | Actions |
|---|---|---|---|---|
| dkist_service_configuration-4.4.0.tar.gz | 18.5 kB | Without provenance | Details for dkist_service_configuration-4.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dkist_service_configuration-4.4.0-py3-none-any.whl | Python 3 | none | any | Details for dkist_service_configuration-4.4.0-py3-none-any.whl |
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
|
Security for dkist-service-configuration 4.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.