Skip to main content

Shared foundation utilities for the KR-Labs analytics platform

Project description

KRL Open Core

Version: 0.1.0
License: MIT
Python: ≥3.9
Status: Production


SECTION A — Executive & Strategic Overview

What This Repository Does

KRL Open Core is the foundation library shared across all KRL packages. It provides:

  1. Configuration Management — Environment variables and YAML config
  2. Structured Logging — JSON-formatted logging with correlation IDs
  3. Caching — File-based and Redis caching with TTL
  4. API Client Base — Reusable HTTP client with retry logic
  5. Utilities — Date parsing, validation, decorators

Why It Matters to the Business

This repository is infrastructure code. Every other KRL package depends on these utilities:

  • Consistent logging across all services
  • Shared configuration patterns
  • Reusable caching layer
  • Common HTTP client behavior

Current Maturity Level: PRODUCTION

Criterion Status
Core utilities implemented ✅ Yes
Logging stable ✅ Yes
Caching stable ✅ Yes
Test coverage ⚠️ Not measured
PyPI published ⚠️ Not yet

Strategic Dependencies

  • Upstream: None (this is the foundation)
  • Downstream: All other KRL packages

Known Gaps

  1. Not on PyPI — Manual installation required
  2. Test coverage unknown — No coverage.xml found

SECTION B — Product, Marketing & Sales Intelligence

Core Utilities

Utility Purpose Status
config Configuration management
logging Structured JSON logging
cache Redis/file caching
http HTTP client with retries
decorators Common decorators
validation Input validation

Not Customer-Facing

This is infrastructure code. It is not directly visible to customers but affects all KRL products.


SECTION C — Engineering & Development Brief

Tech Stack

Component Technology
Language Python ≥3.9
Config pydantic-settings
Logging structlog
HTTP httpx
Cache redis

Repository Structure

krl-open-core/
├── src/
│   └── krl_core/
│       ├── config/         # Configuration management
│       ├── logging/        # Structured logging
│       ├── cache/          # Caching utilities
│       ├── http/           # HTTP client
│       └── utils/          # Common utilities
│
├── tests/                  # Test suite
├── docs/                   # Documentation
├── scripts/                # Build scripts
└── pyproject.toml          # Package definition

How to Run

pip install -e ".[dev]"
pytest tests/ -v

Usage Example

from krl_core.config import get_config
from krl_core.logging import get_logger
from krl_core.cache import Cache

# Configuration
config = get_config()

# Logging
logger = get_logger(__name__)
logger.info("Starting process", correlation_id="abc123")

# Caching
cache = Cache(backend="redis")
cache.set("key", "value", ttl=3600)

SECTION D — Operational & Governance Notes

Maintenance Risks

Risk Severity Mitigation
Not on PyPI MEDIUM Publish to PyPI
Coverage unknown MEDIUM Add coverage measurement
Breaking changes HIGH Version carefully

Ownership


Last updated: December 14, 2025 — Forensic audit

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

krl_open_core-0.2.0.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

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

krl_open_core-0.2.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file krl_open_core-0.2.0.tar.gz.

File metadata

  • Download URL: krl_open_core-0.2.0.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for krl_open_core-0.2.0.tar.gz
Algorithm Hash digest
SHA256 39229a32c36b061feb48c07420109f5f45e674914460bcba725df41d0e7f7dc4
MD5 34e0e118d5e08aa70bdd0ad02a461fa1
BLAKE2b-256 dbbc89fa67c0901e563f936d69491d64721d4d276c96f0d168ca20eb50697f5b

See more details on using hashes here.

File details

Details for the file krl_open_core-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: krl_open_core-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for krl_open_core-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f50c418f22c146183164533555ead9c73462d8db9714905d88d764a74f12f15f
MD5 b9bb8fb36f2f2cd9802d943f726558e4
BLAKE2b-256 277b755bde8cbed4e07b8f43968d9f73c1c670dfcb5c5048685fafa13cc677bc

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