codex-platform 0.1.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.
Files changed (170) hide show
  1. codex_platform-0.1.0/.github/workflows/ci.yml +90 -0
  2. codex_platform-0.1.0/.github/workflows/docs.yml +71 -0
  3. codex_platform-0.1.0/.github/workflows/publish.yml +48 -0
  4. codex_platform-0.1.0/.gitignore +219 -0
  5. codex_platform-0.1.0/.pre-commit-config.yaml +39 -0
  6. codex_platform-0.1.0/CHANGELOG.md +13 -0
  7. codex_platform-0.1.0/PKG-INFO +120 -0
  8. codex_platform-0.1.0/README.md +64 -0
  9. codex_platform-0.1.0/docs/changelog.md +3 -0
  10. codex_platform-0.1.0/docs/en/api/index.md +12 -0
  11. codex_platform-0.1.0/docs/en/api/notifications/channels.md +5 -0
  12. codex_platform-0.1.0/docs/en/api/notifications/delivery/arq.md +5 -0
  13. codex_platform-0.1.0/docs/en/api/notifications/delivery/base.md +5 -0
  14. codex_platform-0.1.0/docs/en/api/notifications/delivery/direct.md +5 -0
  15. codex_platform-0.1.0/docs/en/api/notifications/dto.md +5 -0
  16. codex_platform-0.1.0/docs/en/api/notifications/index.md +5 -0
  17. codex_platform-0.1.0/docs/en/api/notifications/orchestrator.md +5 -0
  18. codex_platform-0.1.0/docs/en/api/notifications/registry.md +5 -0
  19. codex_platform-0.1.0/docs/en/api/notifications/renderer.md +5 -0
  20. codex_platform-0.1.0/docs/en/api/redis_service/base.md +5 -0
  21. codex_platform-0.1.0/docs/en/api/redis_service/index.md +5 -0
  22. codex_platform-0.1.0/docs/en/api/redis_service/keys.md +5 -0
  23. codex_platform-0.1.0/docs/en/api/redis_service/operations/hash.md +5 -0
  24. codex_platform-0.1.0/docs/en/api/redis_service/operations/json_module.md +5 -0
  25. codex_platform-0.1.0/docs/en/api/redis_service/operations/json_string.md +5 -0
  26. codex_platform-0.1.0/docs/en/api/redis_service/operations/list_.md +5 -0
  27. codex_platform-0.1.0/docs/en/api/redis_service/operations/pipeline.md +5 -0
  28. codex_platform-0.1.0/docs/en/api/redis_service/operations/set_.md +5 -0
  29. codex_platform-0.1.0/docs/en/api/redis_service/operations/string.md +5 -0
  30. codex_platform-0.1.0/docs/en/api/redis_service/operations/zset.md +5 -0
  31. codex_platform-0.1.0/docs/en/api/redis_service/service.md +5 -0
  32. codex_platform-0.1.0/docs/en/api/streams/consumer.md +5 -0
  33. codex_platform-0.1.0/docs/en/api/streams/dispatcher.md +5 -0
  34. codex_platform-0.1.0/docs/en/api/streams/index.md +5 -0
  35. codex_platform-0.1.0/docs/en/api/streams/processor.md +5 -0
  36. codex_platform-0.1.0/docs/en/api/streams/producer.md +5 -0
  37. codex_platform-0.1.0/docs/en/api/streams/router.md +5 -0
  38. codex_platform-0.1.0/docs/en/api/workers/arq/base.md +5 -0
  39. codex_platform-0.1.0/docs/en/api/workers/arq/config.md +5 -0
  40. codex_platform-0.1.0/docs/en/api/workers/arq/index.md +5 -0
  41. codex_platform-0.1.0/docs/en/api/workers/arq/task_utils.md +5 -0
  42. codex_platform-0.1.0/docs/en/api/workers/arq/types.md +5 -0
  43. codex_platform-0.1.0/docs/en/architecture/notifications/README.md +66 -0
  44. codex_platform-0.1.0/docs/en/architecture/notifications/data_flow.md +59 -0
  45. codex_platform-0.1.0/docs/en/architecture/redis_service/README.md +62 -0
  46. codex_platform-0.1.0/docs/en/architecture/redis_service/data_flow.md +55 -0
  47. codex_platform-0.1.0/docs/en/architecture/streams/README.md +67 -0
  48. codex_platform-0.1.0/docs/en/architecture/streams/data_flow.md +67 -0
  49. codex_platform-0.1.0/docs/en/architecture/workers/README.md +62 -0
  50. codex_platform-0.1.0/docs/en/architecture/workers/data_flow.md +69 -0
  51. codex_platform-0.1.0/docs/index.md +48 -0
  52. codex_platform-0.1.0/docs/ru/api/index.md +4 -0
  53. codex_platform-0.1.0/docs/ru/api/notifications/channels.md +4 -0
  54. codex_platform-0.1.0/docs/ru/api/notifications/delivery/arq.md +4 -0
  55. codex_platform-0.1.0/docs/ru/api/notifications/delivery/base.md +4 -0
  56. codex_platform-0.1.0/docs/ru/api/notifications/delivery/direct.md +4 -0
  57. codex_platform-0.1.0/docs/ru/api/notifications/dto.md +4 -0
  58. codex_platform-0.1.0/docs/ru/api/notifications/index.md +4 -0
  59. codex_platform-0.1.0/docs/ru/api/notifications/orchestrator.md +4 -0
  60. codex_platform-0.1.0/docs/ru/api/notifications/registry.md +4 -0
  61. codex_platform-0.1.0/docs/ru/api/notifications/renderer.md +4 -0
  62. codex_platform-0.1.0/docs/ru/api/redis_service/base.md +4 -0
  63. codex_platform-0.1.0/docs/ru/api/redis_service/index.md +4 -0
  64. codex_platform-0.1.0/docs/ru/api/redis_service/keys.md +4 -0
  65. codex_platform-0.1.0/docs/ru/api/redis_service/operations/hash.md +4 -0
  66. codex_platform-0.1.0/docs/ru/api/redis_service/operations/json_module.md +4 -0
  67. codex_platform-0.1.0/docs/ru/api/redis_service/operations/json_string.md +4 -0
  68. codex_platform-0.1.0/docs/ru/api/redis_service/operations/list_.md +4 -0
  69. codex_platform-0.1.0/docs/ru/api/redis_service/operations/pipeline.md +4 -0
  70. codex_platform-0.1.0/docs/ru/api/redis_service/operations/set_.md +4 -0
  71. codex_platform-0.1.0/docs/ru/api/redis_service/operations/string.md +4 -0
  72. codex_platform-0.1.0/docs/ru/api/redis_service/operations/zset.md +4 -0
  73. codex_platform-0.1.0/docs/ru/api/redis_service/service.md +4 -0
  74. codex_platform-0.1.0/docs/ru/api/streams/consumer.md +4 -0
  75. codex_platform-0.1.0/docs/ru/api/streams/dispatcher.md +4 -0
  76. codex_platform-0.1.0/docs/ru/api/streams/index.md +4 -0
  77. codex_platform-0.1.0/docs/ru/api/streams/processor.md +4 -0
  78. codex_platform-0.1.0/docs/ru/api/streams/producer.md +4 -0
  79. codex_platform-0.1.0/docs/ru/api/streams/router.md +4 -0
  80. codex_platform-0.1.0/docs/ru/api/workers/arq/base.md +4 -0
  81. codex_platform-0.1.0/docs/ru/api/workers/arq/config.md +4 -0
  82. codex_platform-0.1.0/docs/ru/api/workers/arq/index.md +4 -0
  83. codex_platform-0.1.0/docs/ru/api/workers/arq/task_utils.md +4 -0
  84. codex_platform-0.1.0/docs/ru/api/workers/arq/types.md +4 -0
  85. codex_platform-0.1.0/docs/ru/architecture/notifications/README.md +66 -0
  86. codex_platform-0.1.0/docs/ru/architecture/notifications/data_flow.md +59 -0
  87. codex_platform-0.1.0/docs/ru/architecture/redis_service/README.md +62 -0
  88. codex_platform-0.1.0/docs/ru/architecture/redis_service/data_flow.md +55 -0
  89. codex_platform-0.1.0/docs/ru/architecture/streams/README.md +67 -0
  90. codex_platform-0.1.0/docs/ru/architecture/streams/data_flow.md +67 -0
  91. codex_platform-0.1.0/docs/ru/architecture/workers/README.md +62 -0
  92. codex_platform-0.1.0/docs/ru/architecture/workers/data_flow.md +69 -0
  93. codex_platform-0.1.0/mkdocs.yml +147 -0
  94. codex_platform-0.1.0/pyproject.toml +117 -0
  95. codex_platform-0.1.0/src/codex_platform/__init__.py +1 -0
  96. codex_platform-0.1.0/src/codex_platform/notifications/__init__.py +48 -0
  97. codex_platform-0.1.0/src/codex_platform/notifications/channels.py +24 -0
  98. codex_platform-0.1.0/src/codex_platform/notifications/clients/__init__.py +3 -0
  99. codex_platform-0.1.0/src/codex_platform/notifications/clients/smtp.py +134 -0
  100. codex_platform-0.1.0/src/codex_platform/notifications/delivery/__init__.py +18 -0
  101. codex_platform-0.1.0/src/codex_platform/notifications/delivery/arq.py +69 -0
  102. codex_platform-0.1.0/src/codex_platform/notifications/delivery/base.py +39 -0
  103. codex_platform-0.1.0/src/codex_platform/notifications/delivery/direct.py +89 -0
  104. codex_platform-0.1.0/src/codex_platform/notifications/dto.py +63 -0
  105. codex_platform-0.1.0/src/codex_platform/notifications/interfaces.py +30 -0
  106. codex_platform-0.1.0/src/codex_platform/notifications/orchestrator.py +116 -0
  107. codex_platform-0.1.0/src/codex_platform/notifications/registry.py +71 -0
  108. codex_platform-0.1.0/src/codex_platform/notifications/renderer.py +111 -0
  109. codex_platform-0.1.0/src/codex_platform/redis_service/__init__.py +59 -0
  110. codex_platform-0.1.0/src/codex_platform/redis_service/base.py +69 -0
  111. codex_platform-0.1.0/src/codex_platform/redis_service/exceptions.py +20 -0
  112. codex_platform-0.1.0/src/codex_platform/redis_service/keys.py +110 -0
  113. codex_platform-0.1.0/src/codex_platform/redis_service/managers/__init__.py +18 -0
  114. codex_platform-0.1.0/src/codex_platform/redis_service/managers/base_manager.py +31 -0
  115. codex_platform-0.1.0/src/codex_platform/redis_service/operations/__init__.py +19 -0
  116. codex_platform-0.1.0/src/codex_platform/redis_service/operations/hash.py +302 -0
  117. codex_platform-0.1.0/src/codex_platform/redis_service/operations/json_module.py +129 -0
  118. codex_platform-0.1.0/src/codex_platform/redis_service/operations/json_string.py +113 -0
  119. codex_platform-0.1.0/src/codex_platform/redis_service/operations/list_.py +219 -0
  120. codex_platform-0.1.0/src/codex_platform/redis_service/operations/pipeline.py +197 -0
  121. codex_platform-0.1.0/src/codex_platform/redis_service/operations/set_.py +212 -0
  122. codex_platform-0.1.0/src/codex_platform/redis_service/operations/string.py +318 -0
  123. codex_platform-0.1.0/src/codex_platform/redis_service/operations/zset.py +277 -0
  124. codex_platform-0.1.0/src/codex_platform/redis_service/service.py +80 -0
  125. codex_platform-0.1.0/src/codex_platform/streams/__init__.py +59 -0
  126. codex_platform-0.1.0/src/codex_platform/streams/consumer.py +106 -0
  127. codex_platform-0.1.0/src/codex_platform/streams/dispatcher.py +175 -0
  128. codex_platform-0.1.0/src/codex_platform/streams/processor.py +217 -0
  129. codex_platform-0.1.0/src/codex_platform/streams/producer.py +60 -0
  130. codex_platform-0.1.0/src/codex_platform/streams/router.py +78 -0
  131. codex_platform-0.1.0/src/codex_platform/workers/__init__.py +1 -0
  132. codex_platform-0.1.0/src/codex_platform/workers/arq/__init__.py +27 -0
  133. codex_platform-0.1.0/src/codex_platform/workers/arq/base.py +170 -0
  134. codex_platform-0.1.0/src/codex_platform/workers/arq/config.py +67 -0
  135. codex_platform-0.1.0/src/codex_platform/workers/arq/task_utils.py +72 -0
  136. codex_platform-0.1.0/src/codex_platform/workers/arq/types.py +11 -0
  137. codex_platform-0.1.0/tests/integration/__init__.py +0 -0
  138. codex_platform-0.1.0/tests/integration/conftest.py +20 -0
  139. codex_platform-0.1.0/tests/integration/test_docs_build.py +51 -0
  140. codex_platform-0.1.0/tests/integration/test_redis_service.py +144 -0
  141. codex_platform-0.1.0/tests/integration/test_streams.py +145 -0
  142. codex_platform-0.1.0/tests/unit/__init__.py +0 -0
  143. codex_platform-0.1.0/tests/unit/conftest.py +9 -0
  144. codex_platform-0.1.0/tests/unit/test_arq_task_utils.py +97 -0
  145. codex_platform-0.1.0/tests/unit/test_notification_channels.py +49 -0
  146. codex_platform-0.1.0/tests/unit/test_notification_dto.py +134 -0
  147. codex_platform-0.1.0/tests/unit/test_notification_orchestrator.py +132 -0
  148. codex_platform-0.1.0/tests/unit/test_notification_registry.py +84 -0
  149. codex_platform-0.1.0/tests/unit/test_notification_renderer.py +66 -0
  150. codex_platform-0.1.0/tests/unit/test_notification_smtp.py +95 -0
  151. codex_platform-0.1.0/tests/unit/test_redis_base.py +51 -0
  152. codex_platform-0.1.0/tests/unit/test_redis_hash.py +107 -0
  153. codex_platform-0.1.0/tests/unit/test_redis_keys.py +42 -0
  154. codex_platform-0.1.0/tests/unit/test_redis_list.py +81 -0
  155. codex_platform-0.1.0/tests/unit/test_redis_manager.py +28 -0
  156. codex_platform-0.1.0/tests/unit/test_redis_pipeline.py +48 -0
  157. codex_platform-0.1.0/tests/unit/test_redis_service.py +44 -0
  158. codex_platform-0.1.0/tests/unit/test_redis_set.py +83 -0
  159. codex_platform-0.1.0/tests/unit/test_redis_string.py +126 -0
  160. codex_platform-0.1.0/tests/unit/test_redis_zset.py +103 -0
  161. codex_platform-0.1.0/tests/unit/test_stream_consumer.py +81 -0
  162. codex_platform-0.1.0/tests/unit/test_stream_dispatcher.py +151 -0
  163. codex_platform-0.1.0/tests/unit/test_stream_processor.py +177 -0
  164. codex_platform-0.1.0/tests/unit/test_stream_producer.py +100 -0
  165. codex_platform-0.1.0/tests/unit/test_stream_router.py +86 -0
  166. codex_platform-0.1.0/tools/__init__.py +0 -0
  167. codex_platform-0.1.0/tools/dev/README.md +23 -0
  168. codex_platform-0.1.0/tools/dev/__init__.py +0 -0
  169. codex_platform-0.1.0/tools/dev/check.py +197 -0
  170. codex_platform-0.1.0/tools/dev/generate_project_tree.py +119 -0
@@ -0,0 +1,90 @@
1
+ name: CI Pipeline
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, develop ]
6
+ paths-ignore: [ '**.md', 'docs/**', '.gitignore' ]
7
+ pull_request:
8
+ branches: [ main ]
9
+
10
+ env:
11
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
12
+
13
+ jobs:
14
+ quality-gate:
15
+ name: Quality Gate
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - uses: actions/setup-python@v5
20
+ with:
21
+ python-version: "3.12"
22
+ cache: 'pip'
23
+
24
+ - name: Install Dev Dependencies
25
+ run: |
26
+ python -m pip install --upgrade pip
27
+ pip install -e ".[dev]"
28
+
29
+ - name: Pre-commit (Ruff, Format, Bandit, Secrets)
30
+ uses: pre-commit/action@v3.0.1
31
+
32
+ - name: Run pip-audit
33
+ run: pip install pip-audit && pip-audit
34
+
35
+ - name: Run Mypy
36
+ run: pip install mypy && mypy src/
37
+
38
+ unit-tests:
39
+ name: Unit Tests
40
+ needs: quality-gate
41
+ runs-on: ubuntu-latest
42
+ steps:
43
+ - uses: actions/checkout@v4
44
+ - name: Set up Python 3.12
45
+ uses: actions/setup-python@v5
46
+ with:
47
+ python-version: "3.12"
48
+ cache: 'pip'
49
+
50
+ - name: Install All Dependencies
51
+ run: |
52
+ python -m pip install --upgrade pip
53
+ pip install -e ".[dev]"
54
+
55
+ - name: Run Unit Tests
56
+ run: pytest tests/ -m "unit" -v --tb=short
57
+
58
+ integration-tests:
59
+ name: Integration Tests
60
+ needs: unit-tests
61
+ runs-on: ubuntu-latest
62
+
63
+ services:
64
+ redis:
65
+ image: redis:7-alpine
66
+ ports:
67
+ - 6379:6379
68
+ options: >-
69
+ --health-cmd "redis-cli ping"
70
+ --health-interval 10s
71
+ --health-timeout 5s
72
+ --health-retries 5
73
+
74
+ steps:
75
+ - uses: actions/checkout@v4
76
+ - name: Set up Python 3.12
77
+ uses: actions/setup-python@v5
78
+ with:
79
+ python-version: "3.12"
80
+ cache: 'pip'
81
+
82
+ - name: Install All Dependencies
83
+ run: |
84
+ python -m pip install --upgrade pip
85
+ pip install -e ".[dev,docs]"
86
+
87
+ - name: Run Integration Tests
88
+ env:
89
+ REDIS_URL: redis://localhost:6379/0
90
+ run: pytest tests/ -m "integration" -v --tb=short
@@ -0,0 +1,71 @@
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
+ echo "alias=${MAJOR}.x" >> "$GITHUB_OUTPUT"
56
+
57
+ - name: Deploy versioned docs (tag push)
58
+ if: github.event_name == 'push'
59
+ run: |
60
+ mike deploy --push --update-aliases "${{ steps.version.outputs.alias }}" latest
61
+ mike set-default --push latest
62
+
63
+ - name: Deploy versioned docs (manual)
64
+ if: github.event_name == 'workflow_dispatch'
65
+ run: |
66
+ if [ -n "${{ inputs.alias }}" ]; then
67
+ mike deploy --push --update-aliases "${{ inputs.version }}" "${{ inputs.alias }}"
68
+ else
69
+ mike deploy --push "${{ inputs.version }}"
70
+ fi
71
+ mike set-default --push latest
@@ -0,0 +1,48 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ env:
9
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
10
+
11
+ jobs:
12
+ build-n-publish:
13
+ name: Build and publish to PyPI
14
+ runs-on: ubuntu-latest
15
+ environment:
16
+ name: pypi
17
+ url: https://pypi.org/project/codex-platform/
18
+ permissions:
19
+ id-token: write
20
+ contents: read
21
+
22
+ steps:
23
+ - name: Checkout code
24
+ uses: actions/checkout@v4
25
+ with:
26
+ fetch-depth: 0
27
+
28
+ - name: Set up Python
29
+ uses: actions/setup-python@v5
30
+ with:
31
+ python-version: "3.12"
32
+ cache: 'pip'
33
+
34
+ - name: Install build tools
35
+ run: |
36
+ python -m pip install --upgrade pip
37
+ python -m pip install build twine hatchling
38
+
39
+ - name: Build sdist and wheel
40
+ run: python -m build
41
+
42
+ - name: Check artifacts
43
+ run: twine check dist/*
44
+
45
+ - name: Publish to PyPI
46
+ uses: pypa/gh-action-pypi-publish@release/v1
47
+ with:
48
+ print-hash: true
@@ -0,0 +1,219 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+ #poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ #pdm.lock
116
+ #pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ #pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # SageMath parsed files
135
+ *.sage.py
136
+
137
+ # Environments
138
+ .env
139
+ .envrc
140
+ .venv
141
+ env/
142
+ venv/
143
+ ENV/
144
+ env.bak/
145
+ venv.bak/
146
+
147
+ # Spyder project settings
148
+ .spyderproject
149
+ .ropeproject
150
+
151
+ # mkdocs documentation
152
+ /site
153
+
154
+ # mypy
155
+ .mypy_cache/
156
+ .dmypy.json
157
+ dmypy.json
158
+
159
+ # Pyre type checker
160
+ .pyre/
161
+
162
+ # pytype static type analyzer
163
+ .pytype/
164
+
165
+ # Cython debug symbols
166
+ cython_debug/
167
+
168
+ # PyCharm
169
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
170
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
171
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
172
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
173
+ .idea/
174
+
175
+ # Abstra
176
+ # Abstra is an AI-powered process automation framework.
177
+ # Ignore directories containing user credentials, local state, and settings.
178
+ # Learn more at https://abstra.io/docs
179
+ .abstra/
180
+
181
+ # Visual Studio Code
182
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
183
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
184
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
185
+ # you could uncomment the following to ignore the entire vscode folder
186
+ .vscode/
187
+
188
+ # Ruff stuff:
189
+ .ruff_cache/
190
+
191
+ # PyPI configuration file
192
+ .pypirc
193
+
194
+ # Cursor
195
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
196
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
197
+ # refer to https://docs.cursor.com/context/ignore-files
198
+ .cursorignore
199
+ .cursorindexingignore
200
+
201
+ # Marimo
202
+ marimo/_static/
203
+ marimo/_lsp/
204
+ __marimo__/
205
+
206
+ # Claude Code
207
+ .claude/
208
+
209
+ # Cloud provider folders
210
+ .cloud/
211
+
212
+ # IDEs
213
+ .idea/
214
+ .vscode/
215
+
216
+ # OS junk
217
+ .DS_Store
218
+ Thumbs.db
219
+ *.swp
@@ -0,0 +1,39 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v5.0.0
4
+ hooks:
5
+ - id: trailing-whitespace
6
+ - id: end-of-file-fixer
7
+ - id: check-yaml
8
+ args: [--unsafe] # Позволяет использовать кастомные теги в mkdocs.yml, например !!python/name
9
+ - id: check-json
10
+ - id: check-added-large-files
11
+ args: ['--maxkb=2000']
12
+ - id: check-merge-conflict
13
+
14
+ - repo: https://github.com/astral-sh/ruff-pre-commit
15
+ rev: v0.9.6
16
+ hooks:
17
+ - id: ruff
18
+ args: [--fix]
19
+ - id: ruff-format
20
+
21
+ - repo: https://github.com/igorshubovych/markdownlint-cli
22
+ rev: v0.44.0
23
+ hooks:
24
+ - id: markdownlint
25
+ args: ["--fix", "--disable", "MD013"]
26
+
27
+ - repo: https://github.com/PyCQA/bandit
28
+ rev: 1.8.2
29
+ hooks:
30
+ - id: bandit
31
+ args: ["-c", "pyproject.toml"]
32
+ additional_dependencies: ["bandit[toml]"]
33
+
34
+ # 2. Поиск "забытых" секретов и паролей (усиленный)
35
+ - repo: https://github.com/Yelp/detect-secrets
36
+ rev: v1.5.0
37
+ hooks:
38
+ - id: detect-secrets
39
+ # Baseline will be added after manual creation
@@ -0,0 +1,13 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ Grouped by `Added` · `Changed` · `Deprecated` · `Removed` · `Fixed`.
5
+
6
+ ## [0.1.0] - 2024-05-30
7
+
8
+ ### Added
9
+ - Initial split from monolithic `codex_tools` repository.
10
+ - `redis_service` — async Redis abstraction with typed operations (Hash, String, List, Set, ZSet, JSON, Pipeline).
11
+ - `streams` — Redis Streams producer/consumer with consumer groups, dispatcher, processor, router, and DLQ via ARQ.
12
+ - `notifications` — multi-channel notification engine with ARQ and Direct delivery adapters.
13
+ - `workers.arq` — base ARQ worker infrastructure with health check, DLQ retry, and `CORE_FUNCTIONS`.
@@ -0,0 +1,120 @@
1
+ Metadata-Version: 2.4
2
+ Name: codex-platform
3
+ Version: 0.1.0
4
+ Summary: Infrastructure, background tasks (ARQ), Redis service and framework adapters for Codex
5
+ Project-URL: Homepage, https://github.com/codexdlc/codex-platform
6
+ Project-URL: Documentation, https://codexdlc.github.io/codex-platform/
7
+ Project-URL: Repository, https://github.com/codexdlc/codex-platform
8
+ Project-URL: Issues, https://github.com/codexdlc/codex-platform/issues
9
+ Author: CodexDLC
10
+ License: Apache-2.0
11
+ Keywords: arq,django,notifications,redis,waas,worker
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Requires-Python: >=3.10
20
+ Requires-Dist: codex-core
21
+ Requires-Dist: pydantic<3.0,>=2.0
22
+ Provides-Extra: all
23
+ Requires-Dist: aiosmtplib>=3.0; extra == 'all'
24
+ Requires-Dist: arq>=0.25; extra == 'all'
25
+ Requires-Dist: redis>=5.0; extra == 'all'
26
+ Provides-Extra: arq
27
+ Requires-Dist: arq>=0.25; extra == 'arq'
28
+ Provides-Extra: dev
29
+ Requires-Dist: aiosmtplib>=3.0; extra == 'dev'
30
+ Requires-Dist: arq>=0.25; extra == 'dev'
31
+ Requires-Dist: bandit>=1.7; extra == 'dev'
32
+ Requires-Dist: detect-secrets>=1.5; extra == 'dev'
33
+ Requires-Dist: fakeredis[lua]>=2.20; extra == 'dev'
34
+ Requires-Dist: mypy>=1.10; extra == 'dev'
35
+ Requires-Dist: pip-audit>=2.7; extra == 'dev'
36
+ Requires-Dist: pre-commit>=3.0; extra == 'dev'
37
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
38
+ Requires-Dist: pytest-cov; extra == 'dev'
39
+ Requires-Dist: pytest>=8.0; extra == 'dev'
40
+ Requires-Dist: redis>=5.0; extra == 'dev'
41
+ Requires-Dist: ruff>=0.4; extra == 'dev'
42
+ Provides-Extra: docs
43
+ Requires-Dist: mike>=2.0; extra == 'docs'
44
+ Requires-Dist: mkdocs-include-markdown-plugin; extra == 'docs'
45
+ Requires-Dist: mkdocs-material>=9.0; extra == 'docs'
46
+ Requires-Dist: mkdocs-static-i18n; extra == 'docs'
47
+ Requires-Dist: mkdocs<2.0,>=1.5; extra == 'docs'
48
+ Requires-Dist: mkdocstrings[python]>=0.24; extra == 'docs'
49
+ Provides-Extra: notifications
50
+ Requires-Dist: aiosmtplib>=3.0; extra == 'notifications'
51
+ Provides-Extra: redis
52
+ Requires-Dist: redis>=5.0; extra == 'redis'
53
+ Provides-Extra: streams
54
+ Requires-Dist: redis>=5.0; extra == 'streams'
55
+ Description-Content-Type: text/markdown
56
+
57
+ # codex-platform
58
+
59
+ [![PyPI version](https://img.shields.io/pypi/v/codex-platform.svg)](https://pypi.org/project/codex-platform/)
60
+ [![Python](https://img.shields.io/pypi/pyversions/codex-platform.svg)](https://pypi.org/project/codex-platform/)
61
+ [![CI](https://github.com/codexdlc/codex-platform/actions/workflows/ci.yml/badge.svg)](https://github.com/codexdlc/codex-platform/actions/workflows/ci.yml)
62
+ [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
63
+
64
+ Infrastructure library for the **Codex WaaS toolkit**. Provides async Redis abstraction, Redis Streams event bus, ARQ background workers, and a multi-channel notification engine — each as an independently installable extra.
65
+
66
+ ---
67
+
68
+ ## Install
69
+
70
+ ```bash
71
+ # Core only
72
+ pip install codex-platform
73
+
74
+ # With Redis support
75
+ pip install "codex-platform[redis]"
76
+
77
+ # With ARQ background workers
78
+ pip install "codex-platform[arq]"
79
+
80
+ # With async SMTP notifications
81
+ pip install "codex-platform[notifications]"
82
+
83
+ # Redis Streams
84
+ pip install "codex-platform[streams]"
85
+
86
+ # Everything
87
+ pip install "codex-platform[all]"
88
+ ```
89
+
90
+ ## Quick Start
91
+
92
+ ```python
93
+ from redis.asyncio import Redis
94
+ from codex_platform.redis_service import RedisService
95
+
96
+ redis = Redis(host="localhost", port=6379)
97
+ service = RedisService(redis)
98
+
99
+ await service.hash.set_json("user:42", "profile", {"name": "Alex"})
100
+ data = await service.hash.get_json("user:42", "profile")
101
+ ```
102
+
103
+ ## Modules
104
+
105
+ | Module | Extra | Description |
106
+ | :--- | :--- | :--- |
107
+ | `redis_service` | `[redis]` | Typed async Redis abstraction — Hash, String, List, Set, ZSet, JSON, Pipeline |
108
+ | `streams` | `[streams]` | Redis Streams producer/consumer with consumer groups, retry, and DLQ |
109
+ | `workers.arq` | `[arq]` | ARQ worker base infrastructure — health probes, DLQ retry, CORE_FUNCTIONS |
110
+ | `notifications` | `[notifications]` | Multi-channel notification engine — SMTP, ARQ/Direct delivery, Jinja2 renderer |
111
+
112
+ ## Documentation
113
+
114
+ Full docs with architecture, API reference, and data flow diagrams:
115
+
116
+ **[codexdlc.github.io/codex-platform](https://codexdlc.github.io/codex-platform/)**
117
+
118
+ ## Part of the Codex ecosystem
119
+
120
+ [codex-core](https://github.com/codexdlc/codex-core) · **codex-platform** · [codexdlc](https://github.com/codexdlc)
@@ -0,0 +1,64 @@
1
+ # codex-platform
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/codex-platform.svg)](https://pypi.org/project/codex-platform/)
4
+ [![Python](https://img.shields.io/pypi/pyversions/codex-platform.svg)](https://pypi.org/project/codex-platform/)
5
+ [![CI](https://github.com/codexdlc/codex-platform/actions/workflows/ci.yml/badge.svg)](https://github.com/codexdlc/codex-platform/actions/workflows/ci.yml)
6
+ [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
7
+
8
+ Infrastructure library for the **Codex WaaS toolkit**. Provides async Redis abstraction, Redis Streams event bus, ARQ background workers, and a multi-channel notification engine — each as an independently installable extra.
9
+
10
+ ---
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ # Core only
16
+ pip install codex-platform
17
+
18
+ # With Redis support
19
+ pip install "codex-platform[redis]"
20
+
21
+ # With ARQ background workers
22
+ pip install "codex-platform[arq]"
23
+
24
+ # With async SMTP notifications
25
+ pip install "codex-platform[notifications]"
26
+
27
+ # Redis Streams
28
+ pip install "codex-platform[streams]"
29
+
30
+ # Everything
31
+ pip install "codex-platform[all]"
32
+ ```
33
+
34
+ ## Quick Start
35
+
36
+ ```python
37
+ from redis.asyncio import Redis
38
+ from codex_platform.redis_service import RedisService
39
+
40
+ redis = Redis(host="localhost", port=6379)
41
+ service = RedisService(redis)
42
+
43
+ await service.hash.set_json("user:42", "profile", {"name": "Alex"})
44
+ data = await service.hash.get_json("user:42", "profile")
45
+ ```
46
+
47
+ ## Modules
48
+
49
+ | Module | Extra | Description |
50
+ | :--- | :--- | :--- |
51
+ | `redis_service` | `[redis]` | Typed async Redis abstraction — Hash, String, List, Set, ZSet, JSON, Pipeline |
52
+ | `streams` | `[streams]` | Redis Streams producer/consumer with consumer groups, retry, and DLQ |
53
+ | `workers.arq` | `[arq]` | ARQ worker base infrastructure — health probes, DLQ retry, CORE_FUNCTIONS |
54
+ | `notifications` | `[notifications]` | Multi-channel notification engine — SMTP, ARQ/Direct delivery, Jinja2 renderer |
55
+
56
+ ## Documentation
57
+
58
+ Full docs with architecture, API reference, and data flow diagrams:
59
+
60
+ **[codexdlc.github.io/codex-platform](https://codexdlc.github.io/codex-platform/)**
61
+
62
+ ## Part of the Codex ecosystem
63
+
64
+ [codex-core](https://github.com/codexdlc/codex-core) · **codex-platform** · [codexdlc](https://github.com/codexdlc)
@@ -0,0 +1,3 @@
1
+ {%
2
+ include-markdown "../CHANGELOG.md"
3
+ %}
@@ -0,0 +1,12 @@
1
+ <!-- type: REFERENCE -->
2
+
3
+ # API Reference
4
+
5
+ Auto-generated from source docstrings (Google style). If code behavior contradicts this documentation, the code is the source of truth.
6
+
7
+ | Module | Description |
8
+ | :--- | :--- |
9
+ | [notifications](notifications/index.md) | Multi-channel notification engine |
10
+ | [redis_service](redis_service/index.md) | Async Redis abstraction with typed operations |
11
+ | [streams](streams/index.md) | Redis Streams producer/consumer event bus |
12
+ | [workers.arq](workers/arq/index.md) | ARQ background worker base infrastructure |
@@ -0,0 +1,5 @@
1
+ <!-- type: REFERENCE -->
2
+
3
+ # notifications.channels
4
+
5
+ ::: codex_platform.notifications.channels
@@ -0,0 +1,5 @@
1
+ <!-- type: REFERENCE -->
2
+
3
+ # notifications.delivery.arq
4
+
5
+ ::: codex_platform.notifications.delivery.arq