$npx skillfedfor your agent

expandvars

Expand system variables Unix style

Worth itPyPI Software DevelopmentReleased Sep 20253.5M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — expandvars-1.1.2-py3-none-any.whl
v1.1.2 · released 2025-09-12 · Python >=3.6.2

Yes. expandvars is a lightweight, dependency-free utility with permissive licensing and no known vulnerabilities. It solves a real problem—flexible environment variable expansion in config files—more 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.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.6.2 or later.
  • Low install friction with no runtime dependencies.
  • Aging maintenance status (336 days since last release) but repository remains active with recent commits; stable for a utility of this scope.

License · maintenance · safety

permissive license (permissive) — MIT License permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

last release 2025-09-12 (336 days) · last repo commit 2025-12-17 · 33 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,450,744 downloads/mo, #2,619 on PyPI

Verify before relying

from expandvars import expandvars

result = expandvars("$PATH:${HOME:?}/bin:${UNDEFINED:-/default}")
print(result)
  • Whether the package handles all edge cases in production config-file parsing workflows.
  • Performance characteristics when expanding very large strings or deeply nested variables.
Same gist for agents: .md · .json

What it is and 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.

The module copies most common bash behaviors but does not attempt full bash compliance—for 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.

Use it for

  • 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.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

expandvars is a lightweight, dependency-free utility with permissive licensing and no known vulnerabilities. It solves a real problem—flexible environment variable expansion in config files—more 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.

Install

expandvars on PyPI

Before you install

Low install friction with no runtime dependencies. Aging maintenance status (336 days since last release) but repository remains active with recent commits; stable for a utility of this scope.

Requires Python 3.6.2 or later.

License in practice

MIT License permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

Quickstart

from expandvars import expandvars

result = expandvars("$PATH:${HOME:?}/bin:${UNDEFINED:-/default}")
print(result)

Verify before relying

  • Whether the package handles all edge cases in production config-file parsing workflows.
  • Performance characteristics when expanding very large strings or deeply nested variables.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.6.2
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAging 336 days since the last release
Last repo commit
First released
Downloads3,450,744 / month, #2,619 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: Other AudienceLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: MacOSOperating System :: MicrosoftOperating System :: POSIXOperating System :: UnixProgramming Language :: Python :: 3Topic :: Software DevelopmentTopic :: Utilities

Evidence: expandvars-1.1.2-py3-none-any.whl

Tags

Capabilities
bash variable expansionenvironment variable substitutionunix style variable expansionconfig file variable interpolationshell parameter expansion python
Topics
config-parsingenvironment-variables
PyPI keywords
expandsystemvariables

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 › “unix style variable expansion”

  • expandvarsExpands Unix-style variable references in strings with bash-like…
  • poxPox provides utilities for filesystem exploration, environment…
  • parameter-expansion-patchedExpands POSIX and Bash shell parameter syntax in Python strings…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also envsubst · parameter-expansion-patched · bracex · uri-template · pox · braceexpand · environs · contractions · poetry-dotenv-plugin · xonsh