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.1b3.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for dkist-service-configuration-1.1.1b3.tar.gz
Algorithm Hash digest
SHA256 b12340d278ef6228dba3b518c832bb9533a61df658e8c3c2dbfb83db7fb7527c
MD5 3791dfa36191d6c3ccd8bc25e4f15590
BLAKE2b-256 bdc3750c91b033a6c6bd5aa8a61ecaf689be06e8872d146cb44e1deae7608680

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for dkist_service_configuration-1.1.1b3-py3-none-any.whl
Algorithm Hash digest
SHA256 d3e9ba8d8260b663c1a370730dd2e45e3f893dd248b22f69118d340dca3e7325
MD5 c6a0cf31a528e03598c7594373a7ce96
BLAKE2b-256 e4d07ad42e886babcebc696183c4a8444ac660e21527c42ce26993a3a0c3206d

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