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

Uploaded Python 3

File details

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

File metadata

  • Download URL: codex_core-0.2.1.tar.gz
  • Upload date:
  • Size: 119.4 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.1.tar.gz
Algorithm Hash digest
SHA256 43341e86f505f2df1e5b2b657beb011168bf017ab267b41d727bc9355a618a48
MD5 038df050535a54bf9366812ae2f88373
BLAKE2b-256 0cedde206b7c0d80bd15586b521d27e4f20d311ba5d2a504837ef7ecd6c775d2

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: codex_core-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 987aec7ba92982e1c966ea019ec2b2d24f69fc1f49c06ac4c0578f4a1101c0f5
MD5 d84c61c98d3182f29462cd990cff0c38
BLAKE2b-256 75cd9f160bfe5bf9c63a8aba17b2765cfcd54d260f52d3847111e9060a78777b

See more details on using hashes here.

Provenance

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