braceexpand
Bash-style brace expansion for Python
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
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 · maintenance · safety
MIT (permissive) — MIT license is permissive; you may use, modify, and distribute braceexpand freely in commercial or private projects without restriction.
last release 2021-05-07 (1925 days) · last repo commit 2021-10-08 · 61 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,639,827 downloads/mo, #2,546 on PyPI
Alternatives
Verify before relying
from braceexpand import braceexpand
list(braceexpand('item{1..3}'))
# ['item1', 'item2', 'item3']
list(braceexpand('{a..c}'))
# ['a', 'b', 'c']- Whether unbalanced-brace behavior matches your shell version's exact semantics in edge cases.
- Current compatibility with Python versions released after 2021.
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 on this page. Verify before relying on it.
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
braceexpand on PyPI
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 | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 1,925 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,639,827 / month, #2,546 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 3 |
Evidence: braceexpand-0.1.7-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “bash brace expansion python”
- braceexpandExpands bash-style brace patterns into sequences of strings,…
- bracexBracex expands Bash-style brace patterns into lists of strings,…
- wcmatchwcmatch provides enhanced file pattern matching and globbing with…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also bracex · wcmatch · tree-sitter-bash · expandvars · contractions · parameter-expansion-patched · Fileseq · exrex · py-iam-expand · uri-template