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

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for dkist_service_configuration-2.3.0.tar.gz
Algorithm Hash digest
SHA256 e27a95db74afddaaf93e12d8eaec261f3db568e275655464ad41e97aaa4a0aa9
MD5 c52b72ad34faee595d5eab281b36f1ef
BLAKE2b-256 157720fb28d3023b30350a17b0219ed3e6a6e8c7334af2fef4c7c97824e74a05

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for dkist_service_configuration-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d40d800bffc96e1b44a6346f123b007d663314ab3cbb3aacb60866f1776f94b6
MD5 1a9e332ab10658019a6cffc238cb8cec
BLAKE2b-256 a0ee1cde7565f303b1274c9389b99d307bd0e66c52d38a6311c2978064fb905a

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