--- id: codemod-tox version: "0.5.4" license: MIT license_treatment: permissive maintenance: active --- # codemod-tox — Utilities for editing tox.ini License: permissive · Maintenance: active · Downloads: 182.9K/mo ## What it is and what it does codemod-tox is a utility library for programmatically reading and modifying tox.ini configuration files. It provides parsers for tox environment lists, individual environment definitions, and conditional dependency specifications, allowing you to construct, expand, and transform these configurations as Python objects rather than manipulating raw strings. The library is designed for tools that need to analyze or rewrite tox configurations—such as linters, migration scripts, or test infrastructure generators. It has no runtime dependencies and installs with low friction. It requires Python 3.10 or later and follows semantic versioning with a commitment to rename on major version changes. Use it for: - Automatically expand or filter tox environment matrices in CI/CD pipeline configuration scripts - Build linting or validation tools that need to parse and understand tox.ini structure - Generate or modify tox configurations programmatically in test infrastructure generators - Migrate or refactor tox configurations across multiple projects using codemod-style transformations - Analyze tox environment dependencies to detect conflicts or redundancies ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses and modifies tox.ini configuration strings, including environment lists, environment definitions, and conditional dependencies with support for expansion and transformation. Yes, if you need to parse or modify tox.ini files programmatically. The package is actively maintained, has no dependencies, installs easily, carries a permissive MIT license, and requires only Python 3.10+. It is well-suited for build tools, CI scripts, and configuration management. Not necessary if you only read tox.ini manually or use tox itself without programmatic modification. ## Install pip install codemod-tox uv add codemod-tox poetry add codemod-tox ## Installing codemod-tox Before you install: Low friction install with no runtime dependencies. Active maintenance with recent release; last commit on 2026-04-16. Requires Python 3.10+. License in practice: MIT license permits commercial and private use with minimal restrictions; attribution required. Quickstart: from codemod_tox import ToxEnv, ToxEnvlist # Parse and expand environment definitions env = ToxEnv.parse("py37") | "py38" print(list(env)) # ["py37", "py38"] # Parse and transform environment lists envlist = ToxEnvlist.parse("py37, style") result = envlist.transform_matching( lambda x: x.startswith("py3"), lambda y: y | "py38" ) Requires Python 3.10 or later. Verify before relying: - Whether the package handles all tox.ini syntax variations or only basic cases as described - Performance characteristics when processing large or complex tox configurations - API stability guarantees beyond the meanver/semver promise mentioned in the description ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 182.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags tox.ini parsing, tox configuration editing, environment list manipulation, tox envlist transform, conditional tox dependencies, tox config codemod, parse tox environments, tox, configuration-management, codemod [View on SkillFed](https://skillfed.io/packages/codemod-tox) · [View on PyPI](https://pypi.org/project/codemod-tox/)