codex-core 0.1.0__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {codex_core-0.1.0 → codex_core-0.2.0}/.github/workflows/ci.yml +6 -3
- codex_core-0.2.0/.github/workflows/docs.yml +72 -0
- {codex_core-0.1.0 → codex_core-0.2.0}/.gitignore +3 -0
- codex_core-0.2.0/CHANGELOG.md +82 -0
- codex_core-0.2.0/PKG-INFO +106 -0
- codex_core-0.2.0/README.md +63 -0
- {codex_core-0.1.0/docs/en_EN → codex_core-0.2.0/docs/en}/README.md +3 -3
- {codex_core-0.1.0/docs → codex_core-0.2.0/docs/en}/api/common.md +1 -1
- {codex_core-0.1.0/docs → codex_core-0.2.0/docs/en}/api/core.md +1 -1
- codex_core-0.2.0/docs/en/api/dev.md +29 -0
- {codex_core-0.1.0/docs → codex_core-0.2.0/docs/en}/api/index.md +2 -1
- {codex_core-0.1.0/docs → codex_core-0.2.0/docs/en}/api/settings.md +1 -1
- {codex_core-0.1.0/docs/en_EN → codex_core-0.2.0/docs/en}/architecture/README.md +1 -1
- {codex_core-0.1.0/docs/en_EN → codex_core-0.2.0/docs/en}/architecture/platform/common.md +1 -1
- {codex_core-0.1.0/docs/en_EN → codex_core-0.2.0/docs/en}/architecture/platform/core.md +1 -1
- codex_core-0.2.0/docs/en/architecture/platform/dev.md +225 -0
- {codex_core-0.1.0/docs/en_EN → codex_core-0.2.0/docs/en}/architecture/platform/settings.md +1 -1
- {codex_core-0.1.0 → codex_core-0.2.0}/docs/evolution/roadmap.md +1 -1
- {codex_core-0.1.0 → codex_core-0.2.0}/docs/index.md +4 -4
- {codex_core-0.1.0/docs/ru_RU → codex_core-0.2.0/docs/ru}/README.md +3 -3
- {codex_core-0.1.0/docs/ru_RU → codex_core-0.2.0/docs/ru}/architecture/README.md +1 -1
- {codex_core-0.1.0/docs/ru_RU → codex_core-0.2.0/docs/ru}/architecture/platform/common.md +1 -1
- {codex_core-0.1.0/docs/ru_RU → codex_core-0.2.0/docs/ru}/architecture/platform/core.md +1 -1
- codex_core-0.2.0/docs/ru/architecture/platform/dev.md +225 -0
- {codex_core-0.1.0/docs/ru_RU → codex_core-0.2.0/docs/ru}/architecture/platform/settings.md +1 -1
- {codex_core-0.1.0 → codex_core-0.2.0}/mkdocs.yml +28 -18
- codex_core-0.2.0/project_structure.txt +97 -0
- {codex_core-0.1.0 → codex_core-0.2.0}/pyproject.toml +23 -0
- codex_core-0.2.0/src/codex_core/common/log_context.py +140 -0
- codex_core-0.2.0/src/codex_core/common/loguru_setup.py +339 -0
- codex_core-0.2.0/src/codex_core/common/phone.py +75 -0
- codex_core-0.2.0/src/codex_core/common/text.py +233 -0
- codex_core-0.2.0/src/codex_core/core/base_dto.py +94 -0
- codex_core-0.2.0/src/codex_core/core/exceptions.py +50 -0
- codex_core-0.2.0/src/codex_core/core/pii.py +148 -0
- codex_core-0.2.0/src/codex_core/dev/check_runner.py +201 -0
- codex_core-0.2.0/src/codex_core/dev/project_tree.py +128 -0
- codex_core-0.2.0/src/codex_core/dev/static_compiler/__init__.py +18 -0
- codex_core-0.2.0/src/codex_core/dev/static_compiler/compiler.py +166 -0
- codex_core-0.2.0/src/codex_core/dev/static_compiler/css.py +70 -0
- codex_core-0.2.0/src/codex_core/dev/static_compiler/js.py +56 -0
- codex_core-0.2.0/src/codex_core/settings/base.py +150 -0
- codex_core-0.2.0/tests/conftest.py +21 -0
- codex_core-0.2.0/tests/integration/conftest.py +7 -0
- codex_core-0.2.0/tests/unit/common/test_log_context.py +53 -0
- codex_core-0.2.0/tests/unit/common/test_loguru_setup.py +140 -0
- {codex_core-0.1.0 → codex_core-0.2.0}/tests/unit/common/test_text.py +5 -0
- codex_core-0.2.0/tests/unit/conftest.py +7 -0
- codex_core-0.2.0/tests/unit/core/test_exceptions.py +16 -0
- {codex_core-0.1.0 → codex_core-0.2.0}/tests/unit/core/test_pii.py +32 -1
- codex_core-0.2.0/tools/__init__.py +0 -0
- codex_core-0.2.0/tools/dev/__init__.py +0 -0
- codex_core-0.2.0/tools/dev/check.py +14 -0
- codex_core-0.2.0/tools/dev/generate_project_tree.py +8 -0
- codex_core-0.1.0/.github/workflows/docs.yml +0 -46
- codex_core-0.1.0/CHANGELOG.md +0 -38
- codex_core-0.1.0/PKG-INFO +0 -69
- codex_core-0.1.0/README.md +0 -30
- codex_core-0.1.0/src/codex_core/common/log_context.py +0 -55
- codex_core-0.1.0/src/codex_core/common/loguru_setup.py +0 -192
- codex_core-0.1.0/src/codex_core/common/phone.py +0 -40
- codex_core-0.1.0/src/codex_core/common/text.py +0 -139
- codex_core-0.1.0/src/codex_core/core/base_dto.py +0 -33
- codex_core-0.1.0/src/codex_core/core/exceptions.py +0 -7
- codex_core-0.1.0/src/codex_core/core/pii.py +0 -44
- codex_core-0.1.0/src/codex_core/settings/base.py +0 -82
- codex_core-0.1.0/tests/conftest.py +0 -1
- codex_core-0.1.0/tools/dev/check.py +0 -197
- codex_core-0.1.0/tools/dev/generate_project_tree.py +0 -119
- {codex_core-0.1.0 → codex_core-0.2.0}/.github/workflows/publish.yml +0 -0
- {codex_core-0.1.0 → codex_core-0.2.0}/.pre-commit-config.yaml +0 -0
- {codex_core-0.1.0 → codex_core-0.2.0}/docs/changelog.md +0 -0
- {codex_core-0.1.0/docs/en_EN/guide → codex_core-0.2.0/docs/en/tasks}/getting_started.md +0 -0
- {codex_core-0.1.0/docs/ru_RU/guide → codex_core-0.2.0/docs/ru/tasks}/getting_started.md +0 -0
- {codex_core-0.1.0 → codex_core-0.2.0}/src/codex_core/__init__.py +0 -0
- {codex_core-0.1.0 → codex_core-0.2.0}/src/codex_core/common/__init__.py +0 -0
- {codex_core-0.1.0 → codex_core-0.2.0}/src/codex_core/core/__init__.py +0 -0
- {codex_core-0.1.0/tests/unit → codex_core-0.2.0/src/codex_core/dev}/__init__.py +0 -0
- /codex_core-0.1.0/tools/__init__.py → /codex_core-0.2.0/src/codex_core/py.typed +0 -0
- {codex_core-0.1.0 → codex_core-0.2.0}/src/codex_core/settings/__init__.py +0 -0
- {codex_core-0.1.0 → codex_core-0.2.0}/tests/integration/__init__.py +0 -0
- {codex_core-0.1.0 → codex_core-0.2.0}/tests/integration/test_settings_integration.py +0 -0
- {codex_core-0.1.0/tools/dev → codex_core-0.2.0/tests/unit}/__init__.py +0 -0
- {codex_core-0.1.0 → codex_core-0.2.0}/tests/unit/common/__init__.py +0 -0
- {codex_core-0.1.0 → codex_core-0.2.0}/tests/unit/common/test_phone.py +0 -0
- {codex_core-0.1.0 → codex_core-0.2.0}/tests/unit/core/__init__.py +0 -0
- {codex_core-0.1.0 → codex_core-0.2.0}/tests/unit/settings/__init__.py +0 -0
- {codex_core-0.1.0 → codex_core-0.2.0}/tests/unit/settings/test_settings.py +0 -0
- {codex_core-0.1.0 → codex_core-0.2.0}/tools/dev/README.md +0 -0
|
@@ -36,15 +36,18 @@ jobs:
|
|
|
36
36
|
run: pip install mypy && mypy src/codex_core/
|
|
37
37
|
|
|
38
38
|
unit-tests:
|
|
39
|
-
name: Unit Tests
|
|
39
|
+
name: Unit Tests (Python ${{ matrix.python-version }})
|
|
40
40
|
needs: quality-gate
|
|
41
41
|
runs-on: ubuntu-latest
|
|
42
|
+
strategy:
|
|
43
|
+
matrix:
|
|
44
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
42
45
|
steps:
|
|
43
46
|
- uses: actions/checkout@v4
|
|
44
|
-
- name: Set up Python
|
|
47
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
45
48
|
uses: actions/setup-python@v5
|
|
46
49
|
with:
|
|
47
|
-
python-version:
|
|
50
|
+
python-version: ${{ matrix.python-version }}
|
|
48
51
|
cache: 'pip'
|
|
49
52
|
|
|
50
53
|
- name: Install All Dependencies
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
name: Deploy Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
version:
|
|
10
|
+
description: 'Version alias to deploy (e.g. 0.x, 1.x)'
|
|
11
|
+
required: true
|
|
12
|
+
alias:
|
|
13
|
+
description: 'Alias (latest, stable, or leave empty)'
|
|
14
|
+
required: false
|
|
15
|
+
default: 'latest'
|
|
16
|
+
|
|
17
|
+
env:
|
|
18
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
19
|
+
|
|
20
|
+
permissions:
|
|
21
|
+
contents: write
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
deploy:
|
|
25
|
+
name: Build & Deploy Docs
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
steps:
|
|
28
|
+
- name: Checkout code
|
|
29
|
+
uses: actions/checkout@v4
|
|
30
|
+
with:
|
|
31
|
+
fetch-depth: 0
|
|
32
|
+
|
|
33
|
+
- name: Configure Git Credentials
|
|
34
|
+
run: |
|
|
35
|
+
git config user.name github-actions[bot]
|
|
36
|
+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
37
|
+
|
|
38
|
+
- name: Set up Python 3.12
|
|
39
|
+
uses: actions/setup-python@v5
|
|
40
|
+
with:
|
|
41
|
+
python-version: "3.12"
|
|
42
|
+
cache: 'pip'
|
|
43
|
+
|
|
44
|
+
- name: Install dependencies
|
|
45
|
+
run: |
|
|
46
|
+
python -m pip install --upgrade pip
|
|
47
|
+
pip install -e ".[docs]"
|
|
48
|
+
|
|
49
|
+
- name: Resolve version alias (tag push)
|
|
50
|
+
if: github.event_name == 'push'
|
|
51
|
+
id: version
|
|
52
|
+
run: |
|
|
53
|
+
TAG="${GITHUB_REF_NAME}" # e.g. v1.2.3
|
|
54
|
+
MAJOR=$(echo "$TAG" | sed 's/^v//' | cut -d. -f1)
|
|
55
|
+
MINOR=$(echo "$TAG" | sed 's/^v//' | cut -d. -f2)
|
|
56
|
+
echo "alias=${MAJOR}.x" >> "$GITHUB_OUTPUT"
|
|
57
|
+
|
|
58
|
+
- name: Deploy versioned docs (tag push)
|
|
59
|
+
if: github.event_name == 'push'
|
|
60
|
+
run: |
|
|
61
|
+
mike deploy --push --update-aliases "${{ steps.version.outputs.alias }}" latest
|
|
62
|
+
mike set-default --push latest
|
|
63
|
+
|
|
64
|
+
- name: Deploy versioned docs (manual)
|
|
65
|
+
if: github.event_name == 'workflow_dispatch'
|
|
66
|
+
run: |
|
|
67
|
+
if [ -n "${{ inputs.alias }}" ]; then
|
|
68
|
+
mike deploy --push --update-aliases "${{ inputs.version }}" "${{ inputs.alias }}"
|
|
69
|
+
else
|
|
70
|
+
mike deploy --push "${{ inputs.version }}"
|
|
71
|
+
fi
|
|
72
|
+
mike set-default --push latest
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.2.0] - 2025-02-13
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Python 3.13 Support**: Added official support for Python 3.13 in `pyproject.toml` classifiers.
|
|
12
|
+
- **Comprehensive Unit Tests**:
|
|
13
|
+
- New tests for `core/exceptions.py` covering base exception functionality.
|
|
14
|
+
- New tests for `common/log_context.py` covering `TaskLogContext` logging methods.
|
|
15
|
+
- New tests for `common/loguru_setup.py` covering `InterceptHandler`, `setup_universal_logging`, and `setup_logging` with and without `loguru` installed.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- **Documentation Structure**:
|
|
19
|
+
- Renamed top-level language directories from `en_EN/` to `en/` and `ru_RU/` to `ru/`.
|
|
20
|
+
- Moved `api/` documentation into `en/api/` for better language-specific grouping.
|
|
21
|
+
- Renamed `guide/` directories to `tasks/` in both `en/` and `ru/` to align with `DocArchitect:StructurePolicy` for user-oriented guides.
|
|
22
|
+
- Updated `mkdocs.yml` navigation and all internal Markdown links to reflect the new documentation structure.
|
|
23
|
+
- Updated root `README.md` to strictly follow `DocArchitect:StructurePolicy` (Layer 5 - Root Landing), including a detailed `Modules` table (with `dev` module) and a comprehensive `Part of the Codex ecosystem` section.
|
|
24
|
+
- **Test Coverage Configuration**:
|
|
25
|
+
- Configured `pytest-cov` in `pyproject.toml` to include `addopts`, `[tool.coverage.run]`, and `[tool.coverage.report]` sections.
|
|
26
|
+
- Excluded `src/codex_core/dev/*` from coverage reports as these are internal development tools.
|
|
27
|
+
- Added `exclude_lines` for `TYPE_CHECKING` and `ImportError` to achieve accurate coverage metrics.
|
|
28
|
+
- **Test Isolation**: Implemented `autouse` fixture `reset_pii_registry` in `tests/conftest.py` to ensure `PIIRegistry` global state is reset between tests, guaranteeing test isolation.
|
|
29
|
+
- **Test Markers**: Created `tests/unit/conftest.py` and `tests/integration/conftest.py` to automatically apply `pytest.mark.unit` and `pytest.mark.integration` markers to tests within their respective directories.
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
- **Mypy Errors**: Resolved missing type parameters for generic types in `src/codex_core/dev/static_compiler/compiler.py` and `src/codex_core/dev/static_compiler/css.py`.
|
|
33
|
+
- **Ruff Errors**: Resolved `SIM118` (Use `key in dict` instead of `key in dict.keys()`) in `src/codex_core/core/pii.py`.
|
|
34
|
+
- **Ruff Errors**: Resolved `SIM117` (Use a single `with` statement with multiple contexts) in `tests/unit/common/test_loguru_setup.py`.
|
|
35
|
+
- **Test Coverage Gaps**:
|
|
36
|
+
- Covered `PIIRegistry` initialization logic and recursive list masking in `tests/unit/core/test_pii.py`.
|
|
37
|
+
- Covered falsy input handling in `transliterate` and `sanitize_for_sms` functions in `tests/unit/common/test_text.py`.
|
|
38
|
+
|
|
39
|
+
## [0.1.1] - 2025-02-12
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
- **Declarative PII Registry**: Introduced `PIIRegistry` class in `pii.py` for explicit sensitive field name tracking, complementing the heuristic keyword-based matching.
|
|
43
|
+
- **Enhanced Documentation**:
|
|
44
|
+
- Comprehensive Google-style docstrings added to all core modules: `log_context`, `loguru_setup`, `phone`, `text`, `base_dto`, `exceptions`, and `settings/base`.
|
|
45
|
+
- Added localized (EN/RU) documentation links and PyPI/License badges to `README.md`.
|
|
46
|
+
- **Dependency Management**: Added `loguru` as an explicit optional dependency in `pyproject.toml`.
|
|
47
|
+
|
|
48
|
+
### Changed
|
|
49
|
+
- **PII Masking Logic**: Refined `is_pii_field` and `mask_value` to prioritize explicit registry matches over heuristic keyword search.
|
|
50
|
+
- **Project Configuration**: Updated `.gitignore` to include `.claude/` for modern AI tool support.
|
|
51
|
+
|
|
52
|
+
## [0.1.0] - 2024-05-24
|
|
53
|
+
|
|
54
|
+
### Added
|
|
55
|
+
- **Project Structure**: Initial setup of the core library as a standalone project.
|
|
56
|
+
- **Advanced PII Protection**:
|
|
57
|
+
- Implementation of `BaseDTO` with automated, recursive PII masking in `repr` and `str`.
|
|
58
|
+
- Keyword-based sensitive data detection (phone, email, name, address, notes).
|
|
59
|
+
- **International Utilities**:
|
|
60
|
+
- `normalize_phone`: Robust normalization supporting `+`, `00`, and local German `0` formats.
|
|
61
|
+
- `normalize_name`: Smart capitalization preserving hyphens and spaces.
|
|
62
|
+
- `TaskLogContext`: Structured logging adapter for background tasks and operations.
|
|
63
|
+
- **Base Settings**: `BaseCommonSettings` with standardized Redis URL generation and environment-aware flags.
|
|
64
|
+
- **Documentation**:
|
|
65
|
+
- New Domain-Driven documentation standard (Architecture + API Reference).
|
|
66
|
+
- Bilingual support (EN/RU) with structural mirroring.
|
|
67
|
+
- **Testing**:
|
|
68
|
+
- Comprehensive unit test suite (27 scenarios) covering Core, Common, and Settings.
|
|
69
|
+
- Integration test for environment variable loading.
|
|
70
|
+
|
|
71
|
+
### Changed
|
|
72
|
+
- **Package Rename**: Renamed package from `codex_tools` to `codex_core` for better clarity.
|
|
73
|
+
- **Dependency Optimization**:
|
|
74
|
+
- `loguru` removed from mandatory dependencies.
|
|
75
|
+
- `loguru_setup` updated with safe imports and clear installation instructions.
|
|
76
|
+
- **CI/CD**:
|
|
77
|
+
- Switched GitHub Actions to use Node.js 24 (via `FORCE_JAVASCRIPT_ACTIONS_TO_NODE24`).
|
|
78
|
+
- Updated Mypy paths to reflect the new package structure.
|
|
79
|
+
|
|
80
|
+
### Security
|
|
81
|
+
- Integrated `bandit`, `pip-audit`, and `detect-secrets` into the development lifecycle.
|
|
82
|
+
- Standardized `quote_plus` usage for all infrastructure connection strings.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codex-core
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Core utilities, schemas and settings for Codex WaaS toolkit
|
|
5
|
+
Project-URL: Homepage, https://github.com/codexdlc/codex-core
|
|
6
|
+
Project-URL: Documentation, https://codexdlc.github.io/codex-core/
|
|
7
|
+
Project-URL: Repository, https://github.com/codexdlc/codex-core
|
|
8
|
+
Project-URL: Changelog, https://github.com/codexdlc/codex-core/blob/main/CHANGELOG.md
|
|
9
|
+
Project-URL: Issues, https://github.com/codexdlc/codex-core/issues
|
|
10
|
+
Author: CodexDLC
|
|
11
|
+
License: Apache-2.0
|
|
12
|
+
Keywords: core,pydantic,toolkit,waas
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Requires-Dist: pydantic-settings>=2.0
|
|
23
|
+
Requires-Dist: pydantic<3.0,>=2.0
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: bandit>=1.7; extra == 'dev'
|
|
26
|
+
Requires-Dist: detect-secrets>=1.5; extra == 'dev'
|
|
27
|
+
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
28
|
+
Requires-Dist: pip-audit>=2.7; extra == 'dev'
|
|
29
|
+
Requires-Dist: pre-commit>=3.0; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
|
|
31
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
32
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
33
|
+
Requires-Dist: ruff>=0.4; extra == 'dev'
|
|
34
|
+
Provides-Extra: docs
|
|
35
|
+
Requires-Dist: mike>=2.0; extra == 'docs'
|
|
36
|
+
Requires-Dist: mkdocs-include-markdown-plugin; extra == 'docs'
|
|
37
|
+
Requires-Dist: mkdocs-material>=9.0; extra == 'docs'
|
|
38
|
+
Requires-Dist: mkdocs>=1.5; extra == 'docs'
|
|
39
|
+
Requires-Dist: mkdocstrings[python]>=0.24; extra == 'docs'
|
|
40
|
+
Provides-Extra: loguru
|
|
41
|
+
Requires-Dist: loguru>=0.7.0; extra == 'loguru'
|
|
42
|
+
Description-Content-Type: text/markdown
|
|
43
|
+
|
|
44
|
+
<!-- Type: LANDING -->
|
|
45
|
+
# codex-core
|
|
46
|
+
|
|
47
|
+
[](https://pypi.org/project/codex-core/)
|
|
48
|
+
[](https://pypi.org/project/codex-core/)
|
|
49
|
+
[](https://github.com/codexdlc/codex-core/blob/main/LICENSE)
|
|
50
|
+
[](https://codexdlc.github.io/codex-core/)
|
|
51
|
+
|
|
52
|
+
Core utilities, immutable DTOs, and environment-driven settings for the Codex WaaS toolkit.
|
|
53
|
+
Provides the foundational building blocks and PII masking used by all other Codex components.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Install
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Core only
|
|
61
|
+
pip install codex-core
|
|
62
|
+
|
|
63
|
+
# With Loguru support for advanced structured logging
|
|
64
|
+
pip install "codex-core[loguru]"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Quick Start
|
|
68
|
+
|
|
69
|
+
```python
|
|
70
|
+
from codex_core.core.base_dto import BaseDTO
|
|
71
|
+
|
|
72
|
+
# 1. Define an immutable, PII-aware data transfer object
|
|
73
|
+
class UserDTO(BaseDTO):
|
|
74
|
+
id: int
|
|
75
|
+
email: str # Automatically masked in logs
|
|
76
|
+
phone_number: str # Automatically masked in logs
|
|
77
|
+
|
|
78
|
+
user = UserDTO(id=42, email="user@example.com", phone_number="+491511234567")
|
|
79
|
+
|
|
80
|
+
# 2. Safely log the DTO without leaking personal data
|
|
81
|
+
print(user)
|
|
82
|
+
# Output: UserDTO(id=42, email='***', phone_number='***')
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Modules
|
|
86
|
+
|
|
87
|
+
| Module | Extra | Description |
|
|
88
|
+
| :--- | :--- | :--- |
|
|
89
|
+
| `codex_core.core` | - | Immutable `BaseDTO` and automated `PIIRegistry` for GDPR-safe logging. |
|
|
90
|
+
| `codex_core.common` | `[loguru]` | Phone/name normalization and structured logging adapters (`TaskLogContext`). |
|
|
91
|
+
| `codex_core.settings` | - | Environment-driven configuration via `BaseCommonSettings` (Pydantic Settings). |
|
|
92
|
+
| `codex_core.dev` | `[dev]` | Internal developer tools (`BaseCheckRunner`, `StaticCompiler`, `ProjectTreeGenerator`). |
|
|
93
|
+
|
|
94
|
+
## Documentation
|
|
95
|
+
|
|
96
|
+
Full docs with architecture, API reference, and data flow diagrams:
|
|
97
|
+
|
|
98
|
+
**[https://codexdlc.github.io/codex-core/](https://codexdlc.github.io/codex-core/)**
|
|
99
|
+
|
|
100
|
+
## Part of the Codex ecosystem
|
|
101
|
+
|
|
102
|
+
- **[codex-core](https://github.com/codexdlc/codex-core)**: Foundational utilities and DTOs.
|
|
103
|
+
- **[codex-platform](https://github.com/codexdlc/codex-platform)**: Core platform components and HTTP APIs.
|
|
104
|
+
- **[codex-bot](https://github.com/codexdlc/codex-bot)**: Telegram AI-agent infrastructure.
|
|
105
|
+
- **[codex-services](https://github.com/codexdlc/codex-services)**: Business logic engines (Booking, CRM).
|
|
106
|
+
- **[codex-ai](https://github.com/codexdlc/codex-ai)**: LLM abstraction layer.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<!-- Type: LANDING -->
|
|
2
|
+
# codex-core
|
|
3
|
+
|
|
4
|
+
[](https://pypi.org/project/codex-core/)
|
|
5
|
+
[](https://pypi.org/project/codex-core/)
|
|
6
|
+
[](https://github.com/codexdlc/codex-core/blob/main/LICENSE)
|
|
7
|
+
[](https://codexdlc.github.io/codex-core/)
|
|
8
|
+
|
|
9
|
+
Core utilities, immutable DTOs, and environment-driven settings for the Codex WaaS toolkit.
|
|
10
|
+
Provides the foundational building blocks and PII masking used by all other Codex components.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Core only
|
|
18
|
+
pip install codex-core
|
|
19
|
+
|
|
20
|
+
# With Loguru support for advanced structured logging
|
|
21
|
+
pip install "codex-core[loguru]"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Quick Start
|
|
25
|
+
|
|
26
|
+
```python
|
|
27
|
+
from codex_core.core.base_dto import BaseDTO
|
|
28
|
+
|
|
29
|
+
# 1. Define an immutable, PII-aware data transfer object
|
|
30
|
+
class UserDTO(BaseDTO):
|
|
31
|
+
id: int
|
|
32
|
+
email: str # Automatically masked in logs
|
|
33
|
+
phone_number: str # Automatically masked in logs
|
|
34
|
+
|
|
35
|
+
user = UserDTO(id=42, email="user@example.com", phone_number="+491511234567")
|
|
36
|
+
|
|
37
|
+
# 2. Safely log the DTO without leaking personal data
|
|
38
|
+
print(user)
|
|
39
|
+
# Output: UserDTO(id=42, email='***', phone_number='***')
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Modules
|
|
43
|
+
|
|
44
|
+
| Module | Extra | Description |
|
|
45
|
+
| :--- | :--- | :--- |
|
|
46
|
+
| `codex_core.core` | - | Immutable `BaseDTO` and automated `PIIRegistry` for GDPR-safe logging. |
|
|
47
|
+
| `codex_core.common` | `[loguru]` | Phone/name normalization and structured logging adapters (`TaskLogContext`). |
|
|
48
|
+
| `codex_core.settings` | - | Environment-driven configuration via `BaseCommonSettings` (Pydantic Settings). |
|
|
49
|
+
| `codex_core.dev` | `[dev]` | Internal developer tools (`BaseCheckRunner`, `StaticCompiler`, `ProjectTreeGenerator`). |
|
|
50
|
+
|
|
51
|
+
## Documentation
|
|
52
|
+
|
|
53
|
+
Full docs with architecture, API reference, and data flow diagrams:
|
|
54
|
+
|
|
55
|
+
**[https://codexdlc.github.io/codex-core/](https://codexdlc.github.io/codex-core/)**
|
|
56
|
+
|
|
57
|
+
## Part of the Codex ecosystem
|
|
58
|
+
|
|
59
|
+
- **[codex-core](https://github.com/codexdlc/codex-core)**: Foundational utilities and DTOs.
|
|
60
|
+
- **[codex-platform](https://github.com/codexdlc/codex-platform)**: Core platform components and HTTP APIs.
|
|
61
|
+
- **[codex-bot](https://github.com/codexdlc/codex-bot)**: Telegram AI-agent infrastructure.
|
|
62
|
+
- **[codex-services](https://github.com/codexdlc/codex-services)**: Business logic engines (Booking, CRM).
|
|
63
|
+
- **[codex-ai](https://github.com/codexdlc/codex-ai)**: LLM abstraction layer.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[🏠 Home](../index.md) | [🧭 Guide (EN)](README.md) | [⚙️ API Reference](
|
|
1
|
+
[🏠 Home](../index.md) | [🧭 Guide (EN)](README.md) | [⚙️ API Reference](api/index.md)
|
|
2
2
|
|
|
3
3
|
# Guide: Overview (EN)
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@ Welcome to the **codex-core** guide! This library serves as the shared foundatio
|
|
|
6
6
|
|
|
7
7
|
## Documentation Sections
|
|
8
8
|
|
|
9
|
-
### 1. [Getting Started](
|
|
9
|
+
### 1. [Getting Started](tasks/getting_started.md)
|
|
10
10
|
How to install and integrate `codex-core` into your project.
|
|
11
11
|
|
|
12
12
|
### 2. [🛡️ Architecture & Platform](architecture/README.md)
|
|
@@ -19,5 +19,5 @@ Detailed breakdown of the core platform components:
|
|
|
19
19
|
### 3. [🗺 Evolution](../evolution/roadmap.md)
|
|
20
20
|
Our core purpose and development philosophy.
|
|
21
21
|
|
|
22
|
-
### 4. [⚙️ API Reference](
|
|
22
|
+
### 4. [⚙️ API Reference](api/index.md)
|
|
23
23
|
Technical details for developers.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Dev Tools — API Reference
|
|
2
|
+
|
|
3
|
+
## BaseCheckRunner
|
|
4
|
+
|
|
5
|
+
::: codex_core.dev.check_runner.BaseCheckRunner
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## StaticCompiler
|
|
10
|
+
|
|
11
|
+
::: codex_core.dev.static_compiler.compiler.StaticCompiler
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## CSSCompiler
|
|
16
|
+
|
|
17
|
+
::: codex_core.dev.static_compiler.css.CSSCompiler
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## JSCompiler
|
|
22
|
+
|
|
23
|
+
::: codex_core.dev.static_compiler.js.JSCompiler
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## ProjectTreeGenerator
|
|
28
|
+
|
|
29
|
+
::: codex_core.dev.project_tree.ProjectTreeGenerator
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[🏠 Home](
|
|
1
|
+
[🏠 Home](../../index.md) | [🧭 Guide (EN)](../README.md) | [⚙️ API Reference](index.md)
|
|
2
2
|
|
|
3
3
|
# API Reference Overview
|
|
4
4
|
|
|
@@ -9,6 +9,7 @@ Welcome to the **codex-core** API Reference! This section provides detailed info
|
|
|
9
9
|
- **[🛡️ Core (DTO & PII)](core.md)**: Base data models and PII protection utilities.
|
|
10
10
|
- **[🛠️ Common (Utilities)](common.md)**: Phone, text, and logging helpers.
|
|
11
11
|
- **[⚙️ Settings (Config)](settings.md)**: Base configuration patterns.
|
|
12
|
+
- **[🛠️ Dev Tools](dev.md)**: Internal developer tools.
|
|
12
13
|
|
|
13
14
|
## Technical Details
|
|
14
15
|
|