{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/3"},{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/3"}],"enrichment":{"capability":"Expands Unix-style variable references in strings with bash-like syntax, supporting default values, error handling, and nested variable lookups as an alternative to Python's os.path.expandvars.","skillfed_tags":["config-parsing","environment-variables"],"use_cases":["Parse TOML or INI config files that reference environment variables with fallback defaults.","Build file paths dynamically by expanding $HOME, $PATH, and custom environment variables in application startup.","Validate that required environment variables are set before running a service, using ${VAR:?} syntax.","Substitute secrets and credentials from environment into configuration templates without hardcoding.","Support nested variable references where one env var points to the name of another to resolve."],"what_it_does":"expandvars is a Python module that parses and expands environment variable references in strings using bash-like syntax. It goes beyond Python's built-in os.path.expandvars by supporting advanced features: default values (${VAR:-default}), error-on-undefined (${VAR:?}), variable indirection (${!VAR}), and strict mode (nounset=True). It has no runtime dependencies and is designed primarily for reading configuration files that need flexible environment variable interpolation.\n\nThe module copies most common bash behaviors but does not attempt full bash compliance\u2014for example, it does not support arrays. You can customize the variable symbol, escape character, and expansion data via the lower-level expand() function. It also respects an EXPANDVARS_RECOVER_NULL environment variable to temporarily disable strict parsing in testing scenarios.","worth_installing":"Yes. expandvars is a lightweight, dependency-free utility with permissive licensing and no known vulnerabilities. It solves a real problem\u2014flexible environment variable expansion in config files\u2014more elegantly than os.path.expandvars. Aging maintenance is not a concern for a stable, narrow-scope tool. Install if you need bash-style variable syntax in configuration or string interpolation."},"id":"expandvars","links":{"html":"https://skillfed.io/packages/expandvars","md":"https://skillfed.io/packages/expandvars.md","pypi":"https://pypi.org/project/expandvars/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-09-12","license_spdx":null,"license_treatment":"permissive","name":"expandvars","python_support":"supports_current","summary":"Expand system variables Unix style"},"popularity":{"monthly_downloads":3450744,"position":2619,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.1.2"}
