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

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for dkist-service-configuration-1.1.1b1.tar.gz
Algorithm Hash digest
SHA256 851cf8aa47d0a1fc4835c9a22e3a6e3050aa2670a64a807494a8b24c5a662da9
MD5 e7a9e3e5cf40b1ae4e9051328c0f6da9
BLAKE2b-256 ee12de6b7a8f59dd878e549441c38c776c4969eb02d708aa334405c60b9ea9c1

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for dkist_service_configuration-1.1.1b1-py3-none-any.whl
Algorithm Hash digest
SHA256 f4d2c4ad329a8bdfc8e3b00a781562e030670b2ddabc2599097b553bc7d3b093
MD5 9612b9baba514821ce3b2822edeffc39
BLAKE2b-256 933295d0cab962c9b3fa18c6b9a06c2350a7b1366cde39564aac4f8e674b0f53

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