Skip to main content

Configuration support 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-2.0.0rc1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for dkist_service_configuration-2.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 21d968f303b95eb69e6bc651716ba51bc82f62e968de8bbf1ca38c2b572bfd7b
MD5 ad666bff14fa03635fbbd58af9a644b0
BLAKE2b-256 186fa612db176e5a20d711e6c51c0c6b0e63a4559802ba8a5cac974926a6fbe2

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for dkist_service_configuration-2.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 982b23e7585f5041cbaa329ce52a016e8511bbd9f280bc30a40e903b430c80dd
MD5 016e11223bc7849a1da8a927cbd8c826
BLAKE2b-256 5b27f0015b5ceda0bf68168f550de8eb983510338d9ab70d4a90cab378e224b4

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