Registry / serialization / parameter-expansion-patched

parameter-expansion-patched

JSON →
library0.3.1pypypi✓ verified 79d ago

A Python library that implements shell-style parameter expansion (e.g., ${VAR:-default}, ${VAR#prefix}). It is a patched fork of the original parameter-expansion library, maintained for PyPI distribution. Current version 0.3.1, with occasional updates.

pip install parameter-expansion-patched
INSTALL
IMPORT
SIG · PARAMETER-EXPANSIO
P
parameter-expansion-patched
serializationpythonv0.3.1
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

expand
from parameter_expansion import expand
from parameter_expansion_patched import ParameterExpander
pe
from parameter_expansion import pe
ParameterExpansionNullError
from parameter_expansion import ParameterExpansionNullError

Creates a ParameterExpander with an environment dict, then expands a string with shell parameter syntax.

from parameter_expansion_patched import ParameterExpander expander = ParameterExpander(env={'USER': 'alice', 'HOME': '/home/alice'}) result = expander.expand('Hello ${USER:-default}, your home is ${HOME}') print(result) # Hello alice, your home is /home/alice
Debug
Known issues
gotchaThe expander does NOT access the actual OS environment by default. You must pass a dict or use os.environ explicitly. Failing to do so may lead to empty expansions.
fix
If you want to use the real environment, pass os.environ: ParameterExpander(env=os.environ).
affects: all
gotchaThe library only supports a subset of shell parameter expansion features. Known missing: ${!indirect}, ${parameter:offset:length}, ${parameter/pattern/string} substitution.
fix
Check the documentation for supported syntax before relying on advanced patterns.
affects: all
Upgrade
Version history
0.3.1latest on PyPI · released May 4, 2022
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
parameter-expansion-patched — pip install parameter-expansion-patched · libregistry