Skip to main content

Core utilities, schemas and settings for Codex WaaS toolkit

Project description

codex-core

PyPI Python License Documentation

Core utilities, immutable DTOs, and environment-driven settings for the Codex WaaS toolkit. Provides the foundational building blocks and PII masking used by all other Codex components.


Install

# Core only
pip install codex-core

# With Loguru support for advanced structured logging
pip install "codex-core[loguru]"

Requires Python 3.12 or newer.

Development

uv sync --extra dev
uv run pytest
uv run mypy src/codex_core/
uv run pre-commit run --all-files
uv build --no-sources

Requires Python 3.12 or newer.

Quick Start

from codex_core.core.base_dto import BaseDTO

# 1. Define an immutable, PII-aware data transfer object
class UserDTO(BaseDTO):
    id: int
    email: str         # Automatically masked in logs
    phone_number: str  # Automatically masked in logs

user = UserDTO(id=42, email="user@example.com", phone_number="+491511234567")

# 2. Safely log the DTO without leaking personal data
print(user)
# Output: UserDTO(id=42, email='***', phone_number='***')

Modules

Module Extra Description
codex_core.core - Immutable BaseDTO and automated PIIRegistry for GDPR-safe logging.
codex_core.common [loguru] Phone/name normalization and structured logging adapters (TaskLogContext).
codex_core.settings - Environment-driven configuration via BaseCommonSettings (Pydantic Settings).
codex_core.dev [dev] Internal developer tools (BaseCheckRunner, StaticCompiler, ProjectTreeGenerator).

Documentation

Full docs with architecture, API reference, and data flow diagrams:

https://codexdlc.github.io/codex-core/

Part of the Codex ecosystem

Package Role
codex-core Foundation — immutable DTOs, PII masking, env settings
codex-platform Infrastructure — Redis, Streams, ARQ workers, Notifications
codex-ai LLM layer — unified async interface for OpenAI, Gemini, Anthropic
codex-services Business logic — Booking engine, CRM, Calendar

Each library is fully standalone — install only what your project needs. Together they form the backbone of codex-bot (Telegram AI-agent infrastructure built on aiogram) and codex-django (Django integration layer).

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

codex_core-0.2.2.tar.gz (119.6 kB view details)

Uploaded Source

Built Distribution

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

codex_core-0.2.2-py3-none-any.whl (29.4 kB view details)

Uploaded Python 3

File details

Details for the file codex_core-0.2.2.tar.gz.

File metadata

  • Download URL: codex_core-0.2.2.tar.gz
  • Upload date:
  • Size: 119.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for codex_core-0.2.2.tar.gz
Algorithm Hash digest
SHA256 fb70746d3f5a7f57f9e61a891e713284bd62fd845f1227af275ecaf2446169bf
MD5 36976f78767a16031416419e0d1dc2f4
BLAKE2b-256 563a1d35a245aeef5d7bd38c21fc0f5ef342b2b1702d088c4b301fa8948bc7d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for codex_core-0.2.2.tar.gz:

Publisher: publish.yml on CodexDLC/codex-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file codex_core-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: codex_core-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 29.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for codex_core-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b12410beaa8dce5e04244649fcd9c0d9526f7664ec0df666d9b7b0bb6e324975
MD5 2c5e4e72edf29261d93d768554340b90
BLAKE2b-256 4219cc9064e28235478e7284501e51ecd32cfbcb6863559e0af15bc894a9f8f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for codex_core-0.2.2-py3-none-any.whl:

Publisher: publish.yml on CodexDLC/codex-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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