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.1.tar.gz (15.4 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.1-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: krl_open_core-0.2.1.tar.gz
  • Upload date:
  • Size: 15.4 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.1.tar.gz
Algorithm Hash digest
SHA256 40f6c620d7705b2ab96970777f76f57cd183bd4201256202093e5525508a185a
MD5 4bad26f9bafb72922f44ae596a0c3025
BLAKE2b-256 a4e815bfb369a7f85360957ba8f0fd2ea201f1d8eb957384e93d5f56f6e57569

See more details on using hashes here.

File details

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

File metadata

  • Download URL: krl_open_core-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 16.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 98e296725a292725e6449b9ac84c87ec7b17ee976e9b4f8d44b44b2412d1ab84
MD5 90ee91e152449099ebc01304cf4bdaa7
BLAKE2b-256 ea6bd39d62c9495ed29f7402932efc614096dbbcca0997d5488ab0a10b404490

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