bracex
Bash style brace expander.
Decision gist · record as of 2026-08-14
Yes. Bracex is a lightweight, actively maintained library with zero dependencies, permissive licensing, and no known vulnerabilities. Install it if you need Bash-compatible brace expansion in Python—it's a narrow, well-defined tool that does one thing reliably. The recent release and current Python version support signal ongoing care.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction: pure Python wheel with no runtime dependencies.
- Active maintenance with a release 25 days ago and last commit on 2026-07-20.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) means you can use, modify, and distribute this package freely in both open-source and commercial projects with minimal restrictions.
last release 2026-07-20 (25 days) · last repo commit 2026-07-20 · 33 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 46,407,663 downloads/mo, #610 on PyPI
Alternatives
Verify before relying
pip install bracex
import bracex
result = bracex.expand(r'file-{{a,b},c}d.txt')
print(result) # ['file-ad.txt', 'file-bd.txt', 'file-cd.txt']- Whether the command-line interface (python3 -m bracex) is suitable for production scripting or primarily a demo tool.
- Performance characteristics when expanding very large or deeply nested brace patterns.
What it is and what it does
Bracex is a Python library that implements Bash-style brace expansion, the shell feature that transforms compact pattern syntax into multiple expanded strings. For example, `{a,b}` expands to two variants, and numeric ranges like `{1..3}` expand to sequences. The library aims to follow Bash's expansion logic closely, with test cases validated against actual Bash behavior, though it intentionally omits shell-specific features like command substitution.
You use it by calling `bracex.expand()` with a pattern string and receiving a list of all expansions. It's useful for generating file paths, batch operations, or any scenario where you need to produce multiple related strings from a template. The package includes a command-line interface for shell integration and is fully typed, with zero runtime dependencies.
Use it for
- Generate multiple directory or file paths for batch creation: `bracex.expand('dir/{a,b}/{1..3}')` to create nested folder structures.
- Build dynamic lists of configuration filenames or resource names from a single pattern template.
- Integrate brace expansion into Python scripts that need Bash-compatible pattern matching without invoking a shell.
- Command-line tool to expand patterns for use with xargs or other Unix utilities via `python3 -m bracex`.
- Template-driven test case generation where you need many similar but distinct input strings.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Bracex is a lightweight, actively maintained library with zero dependencies, permissive licensing, and no known vulnerabilities. Install it if you need Bash-compatible brace expansion in Python—it's a narrow, well-defined tool that does one thing reliably. The recent release and current Python version support signal ongoing care.
Install
bracex on PyPI
Before you install
Low friction: pure Python wheel with no runtime dependencies. Active maintenance with a release 25 days ago and last commit on 2026-07-20. Supports current Python versions (3.10 through 3.14).
Requires Python 3.10 or later.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely in both open-source and commercial projects with minimal restrictions.
Quickstart
pip install bracex
import bracex
result = bracex.expand(r'file-{{a,b},c}d.txt')
print(result) # ['file-ad.txt', 'file-bd.txt', 'file-cd.txt']
Verify before relying
- Whether the command-line interface (python3 -m bracex) is suitable for production scripting or primarily a demo tool.
- Performance characteristics when expanding very large or deeply nested brace patterns.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 25 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 46,407,663 / month, #610 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed |
Evidence: bracex-3.0.1-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 › “brace expand like bash”
- bracexBracex expands Bash-style brace patterns into lists of strings,…
- braceexpandExpands bash-style brace patterns into sequences 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 Python Modules 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.
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.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also braceexpand · wcmatch · parameter-expansion-patched · expandvars · pymdown-extensions · backrefs · uri-template · beautysh · grep-ast · adaptive-cards-templating-py