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-2.0.0rc2.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for dkist_service_configuration-2.0.0rc2.tar.gz
Algorithm Hash digest
SHA256 dad2110ad913aecde23477a35f2adaf20b73afb6be9b7c26903b617f1ade63f6
MD5 c2fd294f8c02108a61324c88fe32d963
BLAKE2b-256 1d28653fbb998b01a4303772f9cd21e794238ec3d86a32a125eec9b3da1deba9

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for dkist_service_configuration-2.0.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 70e524bbe2736a5b36295832283048e2e7ffe2cffdce9c1481b884e8d56f3111
MD5 354d54945780e505d2d6ee1ab00bfde1
BLAKE2b-256 62d7e8f78fad2c55bc69314d60148e458cc381508ea2d223275402ccb8c5b90d

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