Configuration Fetcher v0.3.0
Common code for interacting with dev environs, deployed environs with ENV vars or for deployed AWS (optional extra) environs.
Config class
from app_confetti import util
@dataclasses.dataclass(frozen=True)
class Config:
required_key: str = util.env("REQUIRED_KEY")
logging_level: str = util.env("LOGGING_LEVEL:INFO")
sentry_dsn: int = util.env("SENTRY_DSN:__NONE__")
debug: bool = util.env("DEBUG:__FALSE__")
@property
def logging_config(self):
return {
"version": 1,
"disable_existing_loggers": False,
"formatters": {
"default": {
"format": "[%(asctime)s][%(name)s][%(levelname)s]: %(message)s",
"datefmt": "%Y-%m-%d %H:%M:%S",
},
},
"handlers": {
"default": {
"class": "logging.StreamHandler",
"level": self.logging_level,
"formatter": "default",
},
"sentry": {
"level": "ERROR",
"class": "raven.handlers.logging.SentryHandler",
"dsn": self.sentry_dsn,
},
},
"loggers": {
"": {
"handlers": ["default", "sentry"],
"level": self.logging_level,
"propagate": True,
},
"raven": {
"handlers": ["default"],
"level": "WARNING",
"propagate": True,
},
},
}
Release files for app-confetti 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| app_confetti-0.3.0.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| app_confetti-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.6 kB
Release files / app_confetti-0.3.0.tar.gz
| Download URL | app_confetti-0.3.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c697fdebed4c378e0cec969229a918a78ba3cdfeedf677d73752ee10ab16813
|
|
BLAKE2b-256 checksum How to use checksums |
a9252a0de6d4b8bb8d66da9524d551dd87128206832f2ed9a295acdb667865ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.9 Linux/6.1.7-zen1-1-zen
|
Release files / app_confetti-0.3.0-py3-none-any.whl
| Download URL | app_confetti-0.3.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9fe94bfe685a0f2529232ead860702224bbe532c6231c1e8d13e77985de9155c
|
|
BLAKE2b-256 checksum How to use checksums |
d8c9c72ea72ffffc2c767422941091f7d3bb75e92f0192afbe91c3a80d63bf45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.9 Linux/6.1.7-zen1-1-zen
|