Skip to main content

Library for retrieving configurations for DKIST services

Project description

codecov

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


Release history Release notifications | RSS feed

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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

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

File metadata

File hashes

Hashes for dkist_service_configuration-4.4.0rc1.tar.gz
Algorithm Hash digest
SHA256 f5af9ade5894f356ffa9261cd6c46b15c12538b1ac8363f438f4134a22e97ea4
MD5 1dedb969f1f9a093dd3811ec66ad390e
BLAKE2b-256 f613150a1a8684fe33761ee51bf41641972a8aa3410cf93172e5c1d7ee5f0793

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dkist_service_configuration-4.4.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 5573099ce0829b1c83d0aa66c10af78f8a8bbb0cc14ae51328e7c4670a4d85f6
MD5 278d7a8fa12ee7c8ef8a2450d809b82e
BLAKE2b-256 d803fa536657a019019b03161e6ba70b28b4c517bb602d8307f8423c2880d6ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page