ApexCodexPy
The Non-Destructive Configuration Steward for Python Projects.
ApexCodexPy is a CLI tool designed to enforce consistent linting and typing standards across multiple projects. Unlike standard runners, ApexCodexPy synchronizes your pyproject.toml with a "Gold Standard" configuration without destroying existing project-specific settings or comments.
🚀 Purpose
Modern Python development often suffers from "Config Drift"—where different projects slowly diverge in their ruff or mypy settings. ApexCodexPy solves this by:
Enforcing Standards
Overwriting critical linting rules with a centralized set of best practices.
Preserving Context
Using tomlkit to ensure that your handwritten comments and formatting remain intact.
Dry-Run Capability
Allowing developers to see exactly what would change before any modifications are written to disk.
📦 Installation & Integration
From PyPI
Since ApexCodexPy is available on PyPI, you can add it directly to your project using Poetry:
poetry add apexcodexpy --group dev
🛠 Usage
1. Synchronize Configuration
Align your pyproject.toml with the ApexCodexPy standards.
# Preview changes (Dry Run)
codex update --dry-run
# Apply changes
codex update
2. Run Linting & Formatting checks
Run the enforced toolchain (Ruff and Mypy) on your project.
# Standard run (verbose)
codex lint
# No output (suppress stdout/stderr)
codex lint --silent
3. Auto formating and fixing
Run the enforced toolchain (Ruff and Mypy) on your project.
# Standard run (verbose)
codex fix
# No output (suppress stdout/stderr)
codex fix --silent
🧩 Standards Enforced
ApexCodexPy currently enforces a strict ruff.lint.select list including:
| Name | Code |
|---|---|
| pyflakes | F |
| pycodestyle (Errors) | E |
| pycodestyle (Warnings) | W |
| isort | I |
| pep8-naming | N |
| pyupgrade | UP |
| flake8-bugbear | B |
| flake8-builtins | A |
| flake8-comprehensions | C4 |
| flake8-print | T20 |
| flake8-pytest-style | PT |
| flake8-raise | RSE |
| flake8-return | RET |
| flake8-simplify | SIM |
| flake8-unused-arguments | ARG |
It also enforces mypy.strict = true.
👨💻 For Developers: How it Works
Non-Destructive Merge
The core logic resides in a functional deep_merge. It takes the project's current TOML and the ApexCodexPy standards, returns a new configuration, and preserves all tomlkit item metadata (inline comments).
Architecture: Strategy Pattern
- Task Protocol: implementations run various tools and report their results.
- Device Protocol: used by reporter to output results.
- Reporter: standard output format.
- PyCodex: Class that ties everything together.
To add a new tool:
- Create a new Task implementation.
- Add the tool's standard config to get_standards().
- Register the task in PyCodex.
- Add CLI command using the above-mentioned PyCodex method.
Metadata
Release files for apexcodexpy 0.8.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| apexcodexpy-0.8.4.tar.gz | 25.4 kB | Without provenance | Details for apexcodexpy-0.8.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| apexcodexpy-0.8.4-py3-none-any.whl | Python 3 | none | any | Details for apexcodexpy-0.8.4-py3-none-any.whl |
Total release size: 56.6 kB
Release files / apexcodexpy-0.8.4.tar.gz
| Download URL | apexcodexpy-0.8.4.tar.gz |
|---|---|
| Size | 25.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
58824e053eff78152de0628134c4220556d36e23bc019e59813ad255fbca3a26
|
|
BLAKE2b-256 checksum How to use checksums |
892c978b96cc012ca40a922bd5615d5c4d90518073a85ea74d9fd0b492ae8da3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.13.17 Linux/7.0.0-1017-azure
|
Release files / apexcodexpy-0.8.4-py3-none-any.whl
| Download URL | apexcodexpy-0.8.4-py3-none-any.whl |
|---|---|
| Size | 31.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
87a9aed498f123c9c22c9b3ff1bc5cb49cbcdabc9aaec9c3d265c820bcd1b292
|
|
BLAKE2b-256 checksum How to use checksums |
88c1d372458cf23867b983ed8c896176681b29105178b8926863c11cd2578b20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.13.17 Linux/7.0.0-1017-azure
|
Security for apexcodexpy 0.8.4
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.