Metadata-Version: 2.1
Name: expandvars
Version: 0.1.2
Summary: Expand system variables Unix style
Home-page: https://github.com/sayanarijit/expandvars
Author: Arijit Basu (https://arijitbasu.in)
Author-email: sayanarijit@gmail.com
License: MIT
Description: expandvars
        ==========
        Expand system variables Unix style
        
        [![PyPI version](https://img.shields.io/pypi/v/expandvars.svg)](https://pypi.org/project/expandvars)
        [![Build Status](https://travis-ci.org/sayanarijit/expandvars.svg?branch=master)](https://travis-ci.org/sayanarijit/expandvars)
        [![codecov](https://codecov.io/gh/sayanarijit/expandvars/branch/master/graph/badge.svg)](https://codecov.io/gh/sayanarijit/expandvars)
        
        
        Inspiration
        -----------
        This module is inspired by [GNU bash's variable expansion features](https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html). It can be used as an alternative to Python's [os.path.expandvars](https://docs.python.org/3/library/os.path.html#os.path.expandvars) function.
        
        This can be better utilized to read variables from config files to get the capability to read values from environment variables.
        For example:
        
        ```toml
        [default]
        my_secret_access_code = "${ACCESS_CODE:-default_access_code}"
        ```
        
        > NOTE: Although it copies most of the common behaviours, it doesn't follow it strictly. For example, it doesn't work with arrays.
        
        
        Usage
        -----
        
        ```python
        from expandvars import expandvars
        
        print(expandvars("$PATH:$HOME/bin:${SOME_UNDEFINED_PATH:-/custom/path}"))
        # /bin:/sbin:/usr/bin:/usr/sbin:/home/you/bin:/custom/path
        ```
        
        
        Examples
        --------
        For now, [refer to the test cases](https://github.com/sayanarijit/expandvars/blob/master/tests/test_expandvars.py) to see how it behaves.
        
Keywords: expand system variables
Platform: Any
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Other Audience
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Utilities
Classifier: Topic :: Software Development
Classifier: Operating System :: MacOS
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft
Description-Content-Type: text/markdown
Provides-Extra: testing
