codex-core
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.
Optional agent skill
Starting with version 0.5.0, the package includes an offline codex-core usage skill for coding agents. From the consumer project root, use the same Python environment that has the package installed:
python -m pip install "codex-core>=0.5.0"
python -m codex_core.agent_skills install --project .
python -m codex_core.agent_skills status --project .
install creates a managed copy under .agents/skills/codex-core/ and a marked instruction in AGENTS.md. After upgrading the Python package, run python -m codex_core.agent_skills update --project . to refresh the skill. The installer refuses to discard local edits to managed files and preserves unrelated project content. See the agent skill guide for the full lifecycle, removal, and recovery steps. The canonical editable source is src/codex_core/agent_skills/resources/ in this repository.
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).
Metadata
Release files for codex-core 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| codex_core-0.5.0.tar.gz | 146.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| codex_core-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 192.9 kB
Release files / codex_core-0.5.0.tar.gz
| Download URL | codex_core-0.5.0.tar.gz |
|---|---|
| Size | 146.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e8390984e5c1193f14397e0d7e17f67cb9fc756e566bd544f310a9955ff96bf
|
|
BLAKE2b-256 checksum How to use checksums |
351175f6101c75dfa2f1316b3242db165c544e919cabcd1fadfd939d583efcd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.
Transparency logRelease files / codex_core-0.5.0-py3-none-any.whl
| Download URL | codex_core-0.5.0-py3-none-any.whl |
|---|---|
| Size | 46.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d5d6270f4b0b29f5166ee4ca48f3a24cfb9033c01a6a59a25884fb6da8b84419
|
|
BLAKE2b-256 checksum How to use checksums |
cc4351cd26cea291102456673daafcb81be13fa7f3a51777c25881f3c11962e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.
Transparency log