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.2.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file dkist_service_configuration-2.2.tar.gz.

File metadata

File hashes

Hashes for dkist_service_configuration-2.2.tar.gz
Algorithm Hash digest
SHA256 e3ed720801a7412d76ff98d733cad1873ad1da846a4f60a7684cc00caa6bba80
MD5 c1bffcbd6256a6fab7cd081f77ecc75d
BLAKE2b-256 300e20dbed4099e6f9f795acaf337e0a3282abc01f19684d7741ef1f5f8ac32e

See more details on using hashes here.

Provenance

File details

Details for the file dkist_service_configuration-2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for dkist_service_configuration-2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 da2b21690e6e5b15595e061500a25dc8153628f326dfdfb1d2f13b818dec4278
MD5 40afaf776f33e33bf3afa4aba74967a5
BLAKE2b-256 7a5224ca01757b8b23fee41a24f55f38082d23a6464d6a82392b2ab0dca2094c

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