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.0.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.

dkist_service_configuration-4.4.0-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for dkist_service_configuration-4.4.0.tar.gz
Algorithm Hash digest
SHA256 6ca5af6c2dc63595a58978bfa9af89444b3c2f140bbc3dd4ca4213899e96eb9e
MD5 d46f01d0091d3eef84528f5baf0c9b0f
BLAKE2b-256 775400467d2bb87b3581d0ee9055eda0e30abea8c725e72d4898a3f505addd8f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dkist_service_configuration-4.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 49b0c76aded983dc03aaad05c8c417d4c8b8508bdc40a6ea7127faa7856e1e79
MD5 24480876b908fbb5939207f8054736a6
BLAKE2b-256 c21a380e42010202dda17ad741e05118c8c4a4725c12b13ffc612631be9ef3f1

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