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

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for dkist-service-configuration-1.1.0.tar.gz
Algorithm Hash digest
SHA256 bb29e1c5021e76ce09a59c1d8d2b0d3aded624c70e702663222497e7ba2c63c4
MD5 79903a36a94f4e4280c82a830ce07fc5
BLAKE2b-256 99de9d59b540ae2f2c740fd747db824984e7912b762e47a843505c70100f568e

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for dkist_service_configuration-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 394589abfa33fc4f2dbfbafdf03d088795e31db29556af4db2ad2b36d5a5642e
MD5 5b28ae520c4619172711b778bc3293af
BLAKE2b-256 b4276d47aa5390f8cea9918580d0cd87aa970064835b92c5ccef8d184a16dbdd

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