{ "info": { "author": "Sean Saito", "author_email": "saitosean@ymail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Programming Language :: Python :: 3.6" ], "description": "# softshell\n\nTurn hard-coded variables into dynamic ones without refactoring.\n\nThis module allows you to run a script where you replace hard-coded variable assignments with a list of values.\nFor example, suppose we have some script (`add.py`) that looks like this:\n\n```python\nPARAM=2\n\ndef add(x, y=2):\n return x + y\n\nprint(\"Adding {} to 2\".format(PARAM))\nprint(add(PARAM))\n```\n\nWithout changing anything in `add.py`, you just create some configuration (`config.yml`) file like the following:\n\n```yaml\n\n---\npath: add.py\nconfigurations:\n - line_number: 1\n variable: PARAM\n value: [1, 2, 3]\n```\n\nAnd then run this:\n\n```\n$ softshell -f config.yml python add.py\n\n[{'configurations': [{'line_number': 1,\n 'value': [1, 2, 3],\n 'variable': 'PARAM'}],\n 'path': 'add.py'}]\nGoing through edit 1/3\nConfiguration is: [('add.py', [(1, 'PARAM', 1)])]\nLogs can be found here: /var/folders/km/41mjphdd6553jdjjf32y9jkh0000gn/T/tmp7sr_umua\nGoing through edit 2/3\nConfiguration is: [('add.py', [(1, 'PARAM', 2)])]\nLogs can be found here: /var/folders/km/41mjphdd6553jdjjf32y9jkh0000gn/T/tmpn5y4b48c\nGoing through edit 3/3\nConfiguration is: [('add.py', [(1, 'PARAM', 3)])]\nLogs can be found here: /var/folders/km/41mjphdd6553jdjjf32y9jkh0000gn/T/tmpo4vlz7e3\n```\n\nYou will see three separate log files, each showing the result where we set `PARAM` to 1, 2, 3, respectively:\n\n\n```\n$ cat /var/folders/km/41mjphdd6553jdjjf32y9jkh0000gn/T/tmp7sr_umua\nConfiguration is: [('add.py', [(1, 'PARAM', 1)])]\nAdding 1 to 2\n3\n$ cat /var/folders/km/41mjphdd6553jdjjf32y9jkh0000gn/T/tmpn5y4b48c\nConfiguration is: [('add.py', [(1, 'PARAM', 2)])]\nAdding 2 to 2\n4\n$ cat /var/folders/km/41mjphdd6553jdjjf32y9jkh0000gn/T/tmpo4vlz7e3\nConfiguration is: [('add.py', [(1, 'PARAM', 3)])]\nAdding 3 to 2\n5\n```\n\nMore examples can be found in the [examples](examples/) directory\n\n## Installation\n\n```\n$ pip install softshell\n```\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/seansaito/softshell", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "softshell", "package_url": "https://pypi.org/project/softshell/", "platform": "", "project_url": "https://pypi.org/project/softshell/", "project_urls": { "Homepage": "http://github.com/seansaito/softshell" }, "release_url": "https://pypi.org/project/softshell/0.1/", "requires_dist": [ "PyYAML (>=5.1)" ], "requires_python": "", "summary": "Turn hard-coded variables into dynamic ones without refactoring.", "version": "0.1" }, "last_serial": 5346539, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "86953b929f6148696d12b0b694b13683", "sha256": "30e73829b5b02081137a8b51c152d66668c7e5a5f57b49829abbafd58589b137" }, "downloads": -1, "filename": "softshell-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "86953b929f6148696d12b0b694b13683", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7412, "upload_time": "2019-06-01T14:22:43", "url": "https://files.pythonhosted.org/packages/0e/26/b785d1bccb90d79e73e163a2807c5b60058ee10eb175bece679974b5eac7/softshell-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "78b0fa7d39f54abcf9b42c935f508c97", "sha256": "5c49fac530c7ff290d1f9b255b7e4b9409c84faeb9dfe7debc43f74af08e94f8" }, "downloads": -1, "filename": "softshell-0.1.tar.gz", "has_sig": false, "md5_digest": "78b0fa7d39f54abcf9b42c935f508c97", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5741, "upload_time": "2019-06-01T14:22:46", "url": "https://files.pythonhosted.org/packages/d1/9a/01a2a02f8065a83e2a6fea4abc295032bebbec022dde7208d3cb88155d4c/softshell-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "86953b929f6148696d12b0b694b13683", "sha256": "30e73829b5b02081137a8b51c152d66668c7e5a5f57b49829abbafd58589b137" }, "downloads": -1, "filename": "softshell-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "86953b929f6148696d12b0b694b13683", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7412, "upload_time": "2019-06-01T14:22:43", "url": "https://files.pythonhosted.org/packages/0e/26/b785d1bccb90d79e73e163a2807c5b60058ee10eb175bece679974b5eac7/softshell-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "78b0fa7d39f54abcf9b42c935f508c97", "sha256": "5c49fac530c7ff290d1f9b255b7e4b9409c84faeb9dfe7debc43f74af08e94f8" }, "downloads": -1, "filename": "softshell-0.1.tar.gz", "has_sig": false, "md5_digest": "78b0fa7d39f54abcf9b42c935f508c97", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5741, "upload_time": "2019-06-01T14:22:46", "url": "https://files.pythonhosted.org/packages/d1/9a/01a2a02f8065a83e2a6fea4abc295032bebbec022dde7208d3cb88155d4c/softshell-0.1.tar.gz" } ] }