Skip to main content

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:
    1. Explicitly declared class attributes
    2. System environment variables (os.environ)
    3. .env file specific to the subclass (if present)
  • Automatic Variable Merging → New environment variables from .env files 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

keven_core-1.0.0.tar.gz (52.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

keven_core-1.0.0-py3-none-any.whl (83.3 kB view details)

Uploaded Python 3

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

Hashes for keven_core-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2396f30b1d1624bedb2421c6f037af10291e75ba8bf8284f9ed7fa66be318ef8
MD5 cdfa0322f0bba24643b2f9473c085366
BLAKE2b-256 92991ac322c205b59f213e85ed5796f3a0d9b9121eeb1995cbeb6995b1ae3edd

See more details on using hashes here.

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

Hashes for keven_core-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0faf8bea7a558a9cd807b0f2871288099e93e70a570ddfdd1182888272d3703e
MD5 a236c3f79a84e39ae0ea227605d96dcf
BLAKE2b-256 90085fcaadf3eeb3ae7a87c5728c61e9aa80955c9c96a174b77dfd4bc8405154

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