Core utilities and shared components for KEVEN's microservices.
Project description
keven_core v1.0.0
Python package containing common utilities, functions, and helpers across all microservices
keven_core offers the following subpackages:
- configuration
- database
- exceptions
- grpc
- kafka
- logging
- models
- security
- utils
Configuration
Classes and utilities for Configuration
BaseConfig: Dynamic Environment Configuration Management
BaseConfig is the foundational configuration class in keven_core, designed to dynamically load and inherit environment variables across multiple microservice submodules.
How It Works:
- Multi-Level Inheritance → Each subclass (
DomainConfig,DatabaseConfig, etc.) retains and extends the environment variables of its parent, ensuring configuration consistency across modules. - Priority-Based Loading → Variables are loaded in the following order:
- Explicitly declared class attributes
- System environment variables (
os.environ) .envfile specific to the subclass (if present)
- Automatic Variable Merging → New environment variables from
.envfiles or subclass definitions merge with inherited values instead of overwriting them. - Case-Insensitive Access → Variables are normalized and accessible via both uppercase and lowercase names.
This approach ensures that each microservice submodule can define its own configurations while preserving inherited values from parent modules. This way, the domain submodule can be the first to subclass BaseConfig, then the database submodule can subclass the config class from domain, and the resulting instance would contain all of the env variables from both domain and database.🚀
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file keven_core-1.0.0.tar.gz.
File metadata
- Download URL: keven_core-1.0.0.tar.gz
- Upload date:
- Size: 52.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.12.9 Linux/6.8.0-52-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2396f30b1d1624bedb2421c6f037af10291e75ba8bf8284f9ed7fa66be318ef8
|
|
| MD5 |
cdfa0322f0bba24643b2f9473c085366
|
|
| BLAKE2b-256 |
92991ac322c205b59f213e85ed5796f3a0d9b9121eeb1995cbeb6995b1ae3edd
|
File details
Details for the file keven_core-1.0.0-py3-none-any.whl.
File metadata
- Download URL: keven_core-1.0.0-py3-none-any.whl
- Upload date:
- Size: 83.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.12.9 Linux/6.8.0-52-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0faf8bea7a558a9cd807b0f2871288099e93e70a570ddfdd1182888272d3703e
|
|
| MD5 |
a236c3f79a84e39ae0ea227605d96dcf
|
|
| BLAKE2b-256 |
90085fcaadf3eeb3ae7a87c5728c61e9aa80955c9c96a174b77dfd4bc8405154
|