Skip to main content

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


Download files

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

Source Distribution

dkist_service_configuration-4.0.0rc1.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file dkist_service_configuration-4.0.0rc1.tar.gz.

File metadata

File hashes

Hashes for dkist_service_configuration-4.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 ce4f6cd580895e2c6366b816c0eb8e67dd4105331aaf3918758a6ca38414791b
MD5 878caf2e881d7d3bf9b2725e82f0226f
BLAKE2b-256 7817950fc91cae25cfd7fcbce5e4bb21de3c0a93e8fa2c9bcaa60b018b31c8d2

See more details on using hashes here.

Provenance

File details

Details for the file dkist_service_configuration-4.0.0rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for dkist_service_configuration-4.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 b569ae459ffb247adf85ac4edcba48ebba3d3dab4f9c6730cbd302c6f0e23dda
MD5 baaca8d7c98b8e7b71df648f424e846f
BLAKE2b-256 4d7e3e9d098756d9622ed0c2054eb7c2bea23fe0f3f1070678fabf7701c77235

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page