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 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-1.1.1b2.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file dkist-service-configuration-1.1.1b2.tar.gz.

File metadata

File hashes

Hashes for dkist-service-configuration-1.1.1b2.tar.gz
Algorithm Hash digest
SHA256 ba45d198a89991603663b1a9f7ec2098c2d19657e7ab8f9887ea3d85219680b7
MD5 4127eadeb78540b76852e30b78620339
BLAKE2b-256 234e97e6a7760df71075bf290f974068a0c304d6d381ab4e056d9bfcb854dd4a

See more details on using hashes here.

Provenance

File details

Details for the file dkist_service_configuration-1.1.1b2-py3-none-any.whl.

File metadata

File hashes

Hashes for dkist_service_configuration-1.1.1b2-py3-none-any.whl
Algorithm Hash digest
SHA256 0896d726b4184f04a91e7b3186d6c0f8d5ef6f38c73c3d64a0bfd7d1e83225e7
MD5 9797605b9570b0781df2885e2c633315
BLAKE2b-256 9ed66fb5e80ea17edd66a17bf273c92b961dba7c48ad12bc2adb93ca92e1d5d0

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