Skip to main content

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apexcodexpy-0.7.1.tar.gz (24.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apexcodexpy-0.7.1-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

Details for the file apexcodexpy-0.7.1.tar.gz.

File metadata

  • Download URL: apexcodexpy-0.7.1.tar.gz
  • Upload date:
  • Size: 24.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.3 CPython/3.13.15 Linux/6.17.0-1022-azure

File hashes

Hashes for apexcodexpy-0.7.1.tar.gz
Algorithm Hash digest
SHA256 273c69937261b1880ffe379810115cbc7a85ea2066bab5ccdee8724279963314
MD5 8b223d2f4e52cc7ddaeedf1a5e89c729
BLAKE2b-256 5408df3e51c9af0e8b603699ad7cf411f7f28d033cf6e22180911983e15f0930

See more details on using hashes here.

File details

Details for the file apexcodexpy-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: apexcodexpy-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.3 CPython/3.13.15 Linux/6.17.0-1022-azure

File hashes

Hashes for apexcodexpy-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 66804ba8cd0be7ce8bcf68fffacec44f0fb1c929afdee3b9b7b1eae73047ef52
MD5 9b6af38ae61da3ccb3dd390a63f28341
BLAKE2b-256 669a866b215d636bb5bc650c8f20af3a459207ac4a57a17e1946a5d038963a31

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.7.1 This release

2 files

0.6.6

2 files

0.6.5

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.5.4

2 files

0.5.3

2 files

0.5.1

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.3.2

2 files

0.3.1

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page