{ "info": { "author": "Robert Collins", "author_email": "robertc@robertcollins.net", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": ":Homepage: `Shellvars Homepage`_\r\n:Download: `Shellvars on PyPI`_\r\n:Documentation: `Shellvars Docs`_\r\n:License: `MIT License`_\r\n:Support: `Mailing list (testing-in-python@lists.idyll.org)\r\n `_\r\n:Issue tracker: `Github Issues\r\n `_\r\n:Build status:\r\n .. image:: https://travis-ci.org/testing-cabal/shellvars.svg?branch=master\r\n :target: https://travis-ci.org/testing-cabal/shellvars\r\n\r\n.. _Shellvars Homepage: https://github.com/testing-cabal/shellvars\r\n.. _MIT License: http://github.com/testing-cabal/shellvars/blob/master/LICENSE.txt\r\n.. _Shellvars Docs: https://pypi.python.org/pypi/shellvars\r\n.. _Shellvars on PyPI: http://pypi.python.org/pypi/shellvars\r\n\r\n=========\r\nShellvars\r\n=========\r\n\r\nA Python interpreter for shell variable expressions.\r\n\r\nshellvars supports Python 2.6 and up, and should support Jython etc as well.\r\n\r\nThe following expressions are supported:\r\n\r\n* ``$NAME``\r\n* ``${NAME}``\r\n* ``${NAME:-REPLACEMENT}``\r\n* ``${NAME-REPLACEMENT}``\r\n* ``${NAME:=REPLACEMENT}``\r\n* ``${NAME=REPLACEMENT}``\r\n* ``${NAME:?[ERRORMSG]}``\r\n* ``${NAME?[ERRORMSG]}``\r\n* ``${NAME:+REPLACEMENT}``\r\n* ``${NAME+REPLACEMENT}``\r\n\r\nRecursive expressions are supported too. For instance::\r\n\r\n >>> from shellvars import evaluate\r\n >>> evaluate('${foo:-${bar:=baz}}', {})\r\n ('baz', {'bar': 'baz'})\r\n\r\nFor details on shell variable syntax, consult your shell or Posix\r\ndocumentation.\r\n\r\nUsage\r\n=====\r\n\r\nTo evaluate an expression call ``evaluate`` with the expression and any\r\nvariables you want available to the expression. Variables keys and values must\r\nboth be strings. Variables that are missing from your variable dict are\r\nconsidered 'unset' in shell terms.\r\n\r\nThe return is an evaluated string and any variable assignments performed\r\nby the expression.\r\n\r\nPreserving unset expressions\r\n++++++++++++++++++++++++++++\r\n\r\nshellvars has a special mode where expressions that are for unset variables\r\nare preserved rather than evaluated. This permits passing them onto a real\r\nshell to interpret without needing special quoting from the user. For\r\ninstance::\r\n\r\n >>> from shellvars import SKIP\r\n >>> evaluate('$foo $bar', {'foo': 'baz'}, absent=SKIP)\r\n ('baz $bar', {})\r\n\r\n\r\nInstallation\r\n============\r\n\r\nUse pip to install::\r\n\r\n pip install shellvars\r\n\r\nDevelopment\r\n===========\r\n\r\nInstall the test dependencies via pip::\r\n\r\n pip install .[test]\r\n\r\nPush up changes as PR's to the GitHub `repository \r\n`_.\r\n\r\nBug tracker\r\n===========\r\n\r\nUse the GitHub `issue tracker\r\n`_.\r\n\r\nReleasing\r\n=========\r\n\r\nUse semver for version decisions.\r\n\r\nTo release:\r\n\r\n1. Tag the repo e.g. 1.2.3\r\n\r\n2. Build a signed sdist and wheel\r\n\r\n3. Upload to PyPI\r\n\r\nCopyright\r\n=========\r\n\r\nCopyright (c) 2015 Robert Collins \r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/testing-cabal/shellvars", "keywords": "", "license": "UNKNOWN", "maintainer": "", "maintainer_email": "", "name": "shellvars", "package_url": "https://pypi.org/project/shellvars/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/shellvars/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/testing-cabal/shellvars" }, "release_url": "https://pypi.org/project/shellvars/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "Evaluator for common shell variable expressions", "version": "1.0.0" }, "last_serial": 1704197, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "0e1a46ef2b1750d821c92ededba228f7", "sha256": "fe4fd0235b48f4ab7f4aece905974510aa9aab81bb85dc3e89cc7566055a4e26" }, "downloads": -1, "filename": "shellvars-1.0.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "0e1a46ef2b1750d821c92ededba228f7", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 11543, "upload_time": "2015-09-02T04:13:32", "url": "https://files.pythonhosted.org/packages/fc/a6/610f4d0f5ceaaaee2ea9974554bae8299ff8620c709bee7b8dea707cac76/shellvars-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4ff81f1f6cb71cb881aa6aa99b4ef794", "sha256": "293b2306f0be24a17865ffdd86eed5a86b2b915ea7609acf5bef504bfa58469d" }, "downloads": -1, "filename": "shellvars-1.0.0.tar.gz", "has_sig": true, "md5_digest": "4ff81f1f6cb71cb881aa6aa99b4ef794", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7428, "upload_time": "2015-09-02T04:13:25", "url": "https://files.pythonhosted.org/packages/5e/98/d9c87a43868b8a596c31ddb6d35d30b1d6e644eba1b0d85f88c042c86a82/shellvars-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0e1a46ef2b1750d821c92ededba228f7", "sha256": "fe4fd0235b48f4ab7f4aece905974510aa9aab81bb85dc3e89cc7566055a4e26" }, "downloads": -1, "filename": "shellvars-1.0.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "0e1a46ef2b1750d821c92ededba228f7", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 11543, "upload_time": "2015-09-02T04:13:32", "url": "https://files.pythonhosted.org/packages/fc/a6/610f4d0f5ceaaaee2ea9974554bae8299ff8620c709bee7b8dea707cac76/shellvars-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4ff81f1f6cb71cb881aa6aa99b4ef794", "sha256": "293b2306f0be24a17865ffdd86eed5a86b2b915ea7609acf5bef504bfa58469d" }, "downloads": -1, "filename": "shellvars-1.0.0.tar.gz", "has_sig": true, "md5_digest": "4ff81f1f6cb71cb881aa6aa99b4ef794", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7428, "upload_time": "2015-09-02T04:13:25", "url": "https://files.pythonhosted.org/packages/5e/98/d9c87a43868b8a596c31ddb6d35d30b1d6e644eba1b0d85f88c042c86a82/shellvars-1.0.0.tar.gz" } ] }