{ "info": { "author": "Jeroen F.J. Laros", "author_email": "jlaros@fixedpoint.nl", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Topic :: Scientific/Engineering" ], "description": "# SpreadScript: Use a spreadsheet as a function\nThis project provides a way to use spreadsheets from the command line or from\nPython programs.\n\nThe inputs and outputs are defined by two tables in a new sheet named\n\"Interface\". SpreadScript will read the input variables from column `B` and the\nvalues from column `C`. Likewise, the output variables are read from column `E`\nand their values from column `F`. In both cases, the variables are read from\nrow `4` onward until an empty cell is encountered.\n\n\n## Installation\nPrerequisites:\n\n apt install python3-uno\n\nVia [PyPI](https://pypi.python.org/pypi/spreadscript):\n\n pip3 install spreadscript\n\nFrom source:\n\n git clone https://github.com/jfjlaros/spreadscript.git\n cd spreadscript\n pip3 install .\n\n\n## Usage\nSuppose we have the following table.\n\n![Example table.](data/example_table.png)\n\nIf we want to define `a` and `b` as input variables and `total` as the output\nvariable, we first add a new sheet named \"Interface\".\n\n![Example interface.](data/example_interface.png)\n\nIn this sheet we put the input variables in column `B` and the values in column\n`C`. The value of `C4` is `=$Sheet1.C3`, that of `C5` is `=$Sheet1.C4`.\n\nLikewise, the output variables are put in column `E` and the values in column\n`F`. In this example, the value in `F4` is `=$Sheet1.C8`.\n\n### Command line interface\nWith the command line interface, the input and output table can be read.\n\n $ spreadscript read_input data/test.ods\n {\"b\": 2.0, \"a\": 1.0}\n\n $ spreadscript read_output data/test.ods\n {\"total\": 15.0}\n\nTo manipulate the input, use the `process` subcommand:\n\n $ spreadscript process data/test.ods '{\"b\": 12.0}'\n {\"total\": 25.0}\n\n\n### Library\nFirst import the `SpreadScript` class and load a spreadsheet.\n\n```python\n>>> from spreadscript import SpreadScript\n>>>\n>>> spreadsheet = SpreadScript('data/test.ods')\n```\n\nThe input variables can be read with the `read_input` method.\n\n```python\n>>> spreadsheet.read_input()\n{'b': 2.0, 'a': 1.0}\n```\n\nThe `read_output` method returns all output variables.\n\n```python\n>>> spreadsheet.read_output()\n{'total': 15.0}\n```\n\nThe `write_input` method is used to update any variables. \n\n```python\n>>> spreadsheet.write_input({'b': 4.0})\n>>> spreadsheet.read_output()\n{'total': 17.0}\n```\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jfjlaros/spreadscript", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "spreadscript", "package_url": "https://pypi.org/project/spreadscript/", "platform": "any", "project_url": "https://pypi.org/project/spreadscript/", "project_urls": { "Homepage": "https://github.com/jfjlaros/spreadscript" }, "release_url": "https://pypi.org/project/spreadscript/0.0.3/", "requires_dist": null, "requires_python": "", "summary": "spreadscript: Use a spreadsheet as a function.", "version": "0.0.3" }, "last_serial": 3725039, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "9d126451b02ee53e6311a9f33b1b3726", "sha256": "37114b5bcd01bd623405d892ade99c72f0649279dac21ecccd8af7ad9e5185e4" }, "downloads": -1, "filename": "spreadscript-0.0.1.tar.gz", "has_sig": false, "md5_digest": "9d126451b02ee53e6311a9f33b1b3726", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3926, "upload_time": "2018-04-01T16:22:28", "url": "https://files.pythonhosted.org/packages/e3/6b/1eac76ce2a1b31f4b1d3c7c776d7196ed9a0d283aa25e2a05dcd23ae96c2/spreadscript-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "4dbb619179c04bde29aa0350b4ceca91", "sha256": "57506f8623d6e12bcf8dbbc76eb7ebcff17e8f6ab1a9da61dfba8ca2b328d98a" }, "downloads": -1, "filename": "spreadscript-0.0.2.tar.gz", "has_sig": false, "md5_digest": "4dbb619179c04bde29aa0350b4ceca91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4651, "upload_time": "2018-04-01T17:56:48", "url": "https://files.pythonhosted.org/packages/03/ba/be89a30ad3162c0c728ddbd798cc5974e53028fa4c2c7a77f25fcb785db8/spreadscript-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "d456b06c376654c9547bc7981bf8a47e", "sha256": "55cb0ab844f3bea1755d37a9f1d1ec36e1edf0c83d8a8bf668e5f121592964aa" }, "downloads": -1, "filename": "spreadscript-0.0.3.tar.gz", "has_sig": false, "md5_digest": "d456b06c376654c9547bc7981bf8a47e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4713, "upload_time": "2018-04-01T22:01:29", "url": "https://files.pythonhosted.org/packages/d5/b2/6eaa928a58f33c4f695b2b6e3f80c5667449f434a47f189b7f3619b62eba/spreadscript-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d456b06c376654c9547bc7981bf8a47e", "sha256": "55cb0ab844f3bea1755d37a9f1d1ec36e1edf0c83d8a8bf668e5f121592964aa" }, "downloads": -1, "filename": "spreadscript-0.0.3.tar.gz", "has_sig": false, "md5_digest": "d456b06c376654c9547bc7981bf8a47e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4713, "upload_time": "2018-04-01T22:01:29", "url": "https://files.pythonhosted.org/packages/d5/b2/6eaa928a58f33c4f695b2b6e3f80c5667449f434a47f189b7f3619b62eba/spreadscript-0.0.3.tar.gz" } ] }