Shell parameter expansion in Python. Patched by co-maintainer for a PyPI release.
Likely abandoned. No release or commit for years (last release over 4 years ago).
pip install parameter-expansion-patchedPOSIX Parameter Expansion
This is an experimental Python library to enable POSIX parameter expansion in a string. It supports also a subset of Bash parameter expansion.
Note that this is a fork from upstream to support proper release on PyPI.
This repo https://github.com/nexB/parameter_expansion_patched is released at https://pypi.org/project/parameter-expansion-patched/ on PyPI.
Upstream is less active lately at https://github.com/kojiromike/parameter-expansion/
Why not spawning a shell directly for this?
One reason is that it may be security risk. Another reason is to support lightweight analysis or evaluation of shell parameters with few system dependencies and outside of a running shell.
For instance this use in scancode-toolkit as part of a lightweight shell script parser to extract and expand parameters found in some build scripts.