Skip to main content

Library for retrieving configurations 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.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


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.0.0rc3.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file dkist_service_configuration-4.0.0rc3.tar.gz.

File metadata

File hashes

Hashes for dkist_service_configuration-4.0.0rc3.tar.gz
Algorithm Hash digest
SHA256 74962e8b1a80985d6053d88123a6da68b61fa4d2d47fcf99eeef03baa1ee2fc8
MD5 0c12c1b71d4a3f55b788c5568de0b945
BLAKE2b-256 8fbd09d5725fa9fa57de1ae41e1516256c7b7892c8a54589cf2b7153b6b9a13d

See more details on using hashes here.

Provenance

File details

Details for the file dkist_service_configuration-4.0.0rc3-py3-none-any.whl.

File metadata

File hashes

Hashes for dkist_service_configuration-4.0.0rc3-py3-none-any.whl
Algorithm Hash digest
SHA256 ad79ea43e71da45afcd7803c1672e88c2f26ce6b49ac3b1d5bf62f42df5f408f
MD5 14bd60c2dd1791abc65728eb39cdbcbf
BLAKE2b-256 edd1db1a97217bad5fa2e287d3b50501b7173bc142d4b2749185a93f3d11c9c8

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