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

Uploaded Source

Built Distribution

File details

Details for the file dkist-service-configuration-1.0.1.tar.gz.

File metadata

File hashes

Hashes for dkist-service-configuration-1.0.1.tar.gz
Algorithm Hash digest
SHA256 fa5d53366d333a5e75ddab07b8ae07f3a53ca01261b4c942bdb3db7f3a59de84
MD5 a1e2380776785451a1b82b10f6e9a8fd
BLAKE2b-256 eeff218b72bb27ccc7a7fda5c57bb84ddfbd2927536e6bb681aeae5c859fc613

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for dkist_service_configuration-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b4692807a1859ba83b2e1e20d4ab3798d79f30f4c8286c4b98ab3755ee916a86
MD5 32fe79678eb767ef1c87671a138b80c8
BLAKE2b-256 338288ea3855f60cde02e049d2985a13d4a1976a305de573132b1783e886fec9

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