--- id: braceexpand version: "0.1.7" license: MIT license_treatment: permissive maintenance: abandoned --- # braceexpand — Bash-style brace expansion for Python License: permissive · Maintenance: abandoned · Downloads: 3.6M/mo ## What it is and what it does braceexpand is a small, zero-dependency library that translates bash-style brace expansion syntax into Python iterables. It handles integer ranges (e.g., `{1..3}`), character ranges (e.g., `{a..c}`), comma-separated sequences, nested patterns, zero-padding, custom increments, and bidirectional ranges. The function returns an iterator, making it memory-efficient for large expansions. The package is useful when you need to programmatically generate file paths, configuration keys, or test parameters that follow bash expansion rules. It raises `UnbalancedBracesError` on malformed input rather than silently ignoring it as bash does, and mixed-case character ranges exclude certain ASCII characters between uppercase and lowercase letters. Use it for: - Generate file paths or glob-like patterns programmatically without shell invocation. - Create test parameter sets from compact brace notation in test frameworks. - Expand configuration keys or template variables that follow bash syntax conventions. - Build command-line argument lists from shorthand patterns in Python scripts. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Expands bash-style brace patterns into sequences of strings, supporting integer ranges, character ranges, nested patterns, and custom increments. Yes, if you need bash brace expansion in Python and can tolerate an abandoned codebase. The library is simple, has no dependencies, and carries no known vulnerabilities. Install it for one-off pattern generation or legacy tool compatibility, but do not rely on it for new projects requiring active maintenance or future Python version support. ## Install pip install braceexpand uv add braceexpand poetry add braceexpand ## Installing braceexpand Before you install: Installation is frictionless—pure Python wheel with no runtime dependencies. However, the package is abandoned; the last commit was 2021-10-08 and no releases have shipped since 2021-05-07, so security updates and compatibility fixes are unlikely. License in practice: MIT license is permissive; you may use, modify, and distribute braceexpand freely in commercial or private projects without restriction. Quickstart: from braceexpand import braceexpand list(braceexpand('item{1..3}')) # ['item1', 'item2', 'item3'] list(braceexpand('{a..c}')) # ['a', 'b', 'c'] Verify before relying: - Whether unbalanced-brace behavior matches your shell version's exact semantics in edge cases. - Current compatibility with Python versions released after 2021. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 3.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags bash brace expansion python, pattern expansion string sequences, range expansion utility, shell-style glob patterns, brace pattern generator, pattern-expansion, bash-compatibility [View on SkillFed](https://skillfed.io/packages/braceexpand) · [View on PyPI](https://pypi.org/project/braceexpand/)