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-3.0.0rc1.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for dkist_service_configuration-3.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 4f36054894a67e598a7b153196ad896cd78c4c316d62f48b4f274ed85bc93939
MD5 72a3e08f0c31ee38da78eed5ed2aa61e
BLAKE2b-256 a3c5a122b855df3a8324dd2ae9da995ed9f830d9b51895c20996755c03e8cac2

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for dkist_service_configuration-3.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 f2022e60809f11f93e30738256823526ca29f378d13fd93dfc1af64fa7c61f12
MD5 732c9c5c032c2ff02dd16bb260121a30
BLAKE2b-256 d9a1e4c1e136035aaa6171fad81180666473e0ebdeed2566120c4b688dcf6a92

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