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.3.0.tar.gz (125.2 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.3.0-py3-none-any.whl (33.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: codex_core-0.3.0.tar.gz
  • Upload date:
  • Size: 125.2 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.3.0.tar.gz
Algorithm Hash digest
SHA256 3dc573d1c3f8e1b88ceb563835bd4fec14c498884a76bca11daffbb3d9d78347
MD5 57d65a94813397bf87bd3324083a72d2
BLAKE2b-256 8d5511335e1bfa46861b9e7a38678bf8d8438419c23affbe7a1d6210a986d963

See more details on using hashes here.

Provenance

The following attestation bundles were made for codex_core-0.3.0.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.3.0-py3-none-any.whl.

File metadata

  • Download URL: codex_core-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 33.0 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c1ee78a1f1629d5bdc79d511870fc65c14d29f3ab6287ecc62f31a199c216772
MD5 f5b086d0b25ff3e01cf8c8f8982960bd
BLAKE2b-256 a7677ab0dea9a79ff0085343468a473b084e3bbefe03b75ea67da6307eb3cc1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for codex_core-0.3.0-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