{ "info": { "author": "Florian Kempenich", "author_email": "Flori@nKempenich.com", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: MIT License", "Topic :: Home Automation", "Topic :: Office/Business :: Financial", "Topic :: Utilities" ], "description": "# Shopping List - Do More, Pay Less\n[![Travis](https://img.shields.io/travis/FlorianKempenich/Shopping-List.svg)](https://travis-ci.org/FlorianKempenich/Shopping-List) [![PyPI](https://img.shields.io/pypi/v/shoppinglist.svg)](https://pypi.org/project/shoppinglist/)\n\n`shopping_list` is a simple tool to calculate the cost breakdown and total of a shopping list containing items in multiple categories.\n\nIt allows to create **different variation of prices**, to compare the influence in the total cost. \nSee the corresponding section [Pro Tip - Price combinations](#pro-tip---price-combinations)\n\n## `shopping_list` in action\nThe project was originally created to estimate the total cost of devices in a Home-Automation project and **see the influence of different purchase decisions**.\n\n#### Given:\n* A list of prices\n* A shopping list of items per category (per room in the example)\n\n#### It generates an output breaking down the costs.\n\n\n```shell\n> shoppinglist shopping_list.yaml prices.yaml \n\nTotal cost breakdown\n\n---\nLiving Room: 77.5 \u20ac\nKitchen: 45 \u20ac\nExtra: 15 \u20ac\n---\n\nTotal: 137.5 \u20ac\n\n```\n\n#### With `shopping_list.yaml`\n```yaml\nLiving-room:\n - InWallSwitch\n - InWallSwitch\n - PaddleSwitch\n - MotionSensor\n\nKitchen:\n - BulbBasic\n - BulbAmbiance\n\nExtra:\n - Shipping\n```\n\n#### And `prices.yaml`\n```yaml\nInWallSwitch: 26\nPaddleSwitch: 15\n\nMotionSensor: 10.5\n\nBulbBasic: 15\nBulbAmbiance: 30\n\nShipping: 15\n```\n\n\n#### Demo versions of these files can be find under `demo/` \n```shell\ncd demo\nshoppinglist shopping_list.yaml prices.yaml\n```\n\n## Usage\n### Installation\n```bash\npip3 install shoppinglist\n# Or\npip3 install --user shoppinglist\n```\n**Warning:** Use python 3!\n\n### Usage\n```\nUsage: shoppinglist [OPTIONS] SHOPPING_LIST_FILE PRICES_FILE\n [PRICE_OVERRIDES_FILES]...\n\nOptions:\n --with-count Display the count for each item\n --without-breakdown Hide the cost breakdown for each category\n --help Show this message and exit.\n```\n#### Arguments\n##### `SHOPPING_LIST_FILE`\n* The shopping list\n* `shopping_list.yaml` in the previous examples\n\n##### `PRICES_FILE`\n* The base prices\n* `prices.yaml` in the previous examples\n\n##### `[PRICE_OVERRIDES_FILES]`\n* Zero or multiple _price overrides files_\n* A _price override_ has the same format as the `PRICES_FILE` file\n* `PRICE_OVERRIDES_FILES` define prices overridings the base prices present in `PRICES_FILE`\n* Kinda like _mixins_ for the price list\n* In case of _multiple overrides_, only the _last one_ is taken into account\n\n#### Format for the files\n##### `prices.yaml` and `price_overrides_*.yaml`\n* 1 item per line, with its price\n* See example\n\n##### `shopping_list.yaml`\n* 1 block per category\n* Each block contains a list on items\n* Item prices must have been defined in `prices.yaml`\n* Duplicates allowed, they will be counted twice\n* See example\n\n## Pro Tip - Price combinations\nCreate different combination of **prices** to see quickly see the influence of your purchase decisions.\n\n#### To do so, you have 2 options:\n* Define **multiple base prices**\n* Define **a base price** and **override individual items**\n\n### Using multiple base prices\n##### For instance `amazon.yaml`\n```yaml\nInWallSwitch: 56 <- More expensive InWallSwitch\nPaddleSwitch: 7 <- Cheaper PaddleSwitch\n\nMotionSensor: 10.5\n\nBulbBasic: 15\nBulbAmbiance: 30\n\nShipping: 0 <- Free shipping\n```\n\n##### Or `upgrade_basic_to_ambiance.yaml`\n```yaml\nInWallSwitch: 26\nPaddleSwitch: 15\n\nMotionSensor: 10.5\n\nBulbBasic: 30 <- Bump the price of 'basic' bulb to match\nBulbAmbiance: 30 the one of the 'ambiance' variation\n and see how it affects the Total!\nShipping: 15\n```\n\n##### Results\n```shell\n# In 'demo/' folder\n\n> shoppinglist shopping_list.yaml prices.yaml\n...\nTotal: 137.5 \u20ac\n\n> shoppinglist shopping_list.yaml amazon.yaml \n...\nTotal: 174.5 \u20ac\n\n> shoppinglist shopping_list.yaml upgrade_basic_to_ambiance.yaml\n...\nTotal: 152.5 \u20ac\n```\n\n\n### Using prices overrides\n##### With base `prices.yaml`\n```yaml\nInWallSwitch: 26\nPaddleSwitch: 15\n\nMotionSensor: 10.5\n\nBulbBasic: 15\nBulbAmbiance: 30\n\nShipping: 15\n```\n\n##### First override `free_shipping.yaml`\n```yaml\nShipping: 0 <- Free shipping\n```\n\n##### Second override `tradfri_bulb_instead_of_hue.yaml`\n```yaml\nBulbBasic: 10 <- Cheaper Bulbs\nBulbAmbiance: 20 <- Cheaper Bulbs\n```\n\n##### Results\n```shell\n# In 'demo/' folder\n\n> shoppinglist shopping_list.yaml prices.yaml\n...\nTotal: 137.5 \u20ac\n\n> shoppinglist shopping_list.yaml prices.yaml free_shipping.yaml\n...\nTotal: 122.5 \u20ac\n\n> shoppinglist shopping_list.yaml prices.yaml free_shipping.yaml tradfri_bulb_instead_of_hue.yaml\n...\nTotal: 107.5 \u20ac\n```\n\n## Development\n### Prerequisites: Pipenv\nThis project needs `pipenv` in order to work.\n\nIf you haven't set it up already... please do yourself a favor and read about it. That thing made my life just slightly better... but to the point where I actually notice an increase in my mood while working with python projects. \nKudos to them :)\n\nMore info on: [Pipenv: Python Development Workflow for Humans](https://github.com/pypa/pipenv)\n\n**Interested in having that setup automatically for you?** \nThen check out my ansible role that does just that ;) \n**==>** [FlorianKempenich.python-virtualenv](https://github.com/FlorianKempenich/ansible-role-python-virtualenv)\n\n### Installation\n```bash\ngit clone git@github.com:FlorianKempenich/Shopping-List.git\ncd Shopping-List\npipenv install --dev\npipenv shell\n```\n\n### Tests\n```bash\npytest\n# Or\n./start_tdd.sh\n```\n\n\n\n\n\n## Author Information\nFollow me on Twitter: [@ThisIsFlorianK](https://twitter.com/ThisIsFlorianK) \nFind out more about my work: [Florian Kempenich - Personal Website](https://floriankempenich.com)", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://floriankempenich.github.io/Shopping-List", "keywords": "shopping calculator cost saving money shopping_list cli awesome", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "shoppinglist", "package_url": "https://pypi.org/project/shoppinglist/", "platform": "", "project_url": "https://pypi.org/project/shoppinglist/", "project_urls": { "Homepage": "https://floriankempenich.github.io/Shopping-List" }, "release_url": "https://pypi.org/project/shoppinglist/1.1.0/", "requires_dist": null, "requires_python": "", "summary": "Quickly different combinations of prices and spare money", "version": "1.1.0" }, "last_serial": 4011392, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "b9b6d4d663222febf76f2f7e6f9b4fea", "sha256": "ff95994cf35263d7f69ed11d171f021500b42ba2f14fdc25394c0b1de29a15e3" }, "downloads": -1, "filename": "shoppinglist-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b9b6d4d663222febf76f2f7e6f9b4fea", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 6004, "upload_time": "2018-06-27T19:04:39", "url": "https://files.pythonhosted.org/packages/00/d9/d78318c1617db57143fd200fe00cfc78917133743524250b7c04f94ba70f/shoppinglist-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3de66a30b44dc0733eef94dbba2de6dc", "sha256": "82304b7f6d9054975b0877ecf874d4d47d7f1b7dafc006a1ed600008ddd68838" }, "downloads": -1, "filename": "shoppinglist-1.0.0.tar.gz", "has_sig": false, "md5_digest": "3de66a30b44dc0733eef94dbba2de6dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6132, "upload_time": "2018-06-27T19:04:37", "url": "https://files.pythonhosted.org/packages/42/2a/adf65cd1f7000e1c6cfd98341704d196a095de05e574d8e60e6b64c4e279/shoppinglist-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "53ff5ef71b09b5ef3f1621036a723ed4", "sha256": "faae14d59f87c5d61eee1559d1cf06e5f47b62d36f1c2f91fbfb2aeb17dca8a0" }, "downloads": -1, "filename": "shoppinglist-1.0.1.tar.gz", "has_sig": false, "md5_digest": "53ff5ef71b09b5ef3f1621036a723ed4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6121, "upload_time": "2018-06-27T19:15:10", "url": "https://files.pythonhosted.org/packages/37/36/61af034b9e265c5e52d977e81f01fadde4ed94b3ecd055b7d1e3061389d3/shoppinglist-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "205921d4d06eb224ebacd3a67c60e35f", "sha256": "5f0dfde67e1881bb5f0241eec3ac637ca12754ab0dd01709bb697d5e7abe2a7d" }, "downloads": -1, "filename": "shoppinglist-1.0.2.tar.gz", "has_sig": false, "md5_digest": "205921d4d06eb224ebacd3a67c60e35f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6204, "upload_time": "2018-06-27T19:21:47", "url": "https://files.pythonhosted.org/packages/3f/74/2cec2456a9e5a284a26738638176e88beb88558d092d13c167fab1735b64/shoppinglist-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "c0fad5053a49d0bb0876942a461a3492", "sha256": "5df90c7edc12acdd527760ea3d845708c9788ddf49fe653a52187a3c0b818867" }, "downloads": -1, "filename": "shoppinglist-1.0.3.tar.gz", "has_sig": false, "md5_digest": "c0fad5053a49d0bb0876942a461a3492", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6205, "upload_time": "2018-06-27T19:25:14", "url": "https://files.pythonhosted.org/packages/2f/c7/57f9996757dc19905aa2d2b2fdac0297ef97c2d1107ae5ab5ce685d895d3/shoppinglist-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "2eec14d7d6c8ae066987602f20eb6a73", "sha256": "b91b2b590c10ee8889fcadee53f6f082cb78ed0b508446394e3cf6276bf6f57b" }, "downloads": -1, "filename": "shoppinglist-1.0.4.tar.gz", "has_sig": false, "md5_digest": "2eec14d7d6c8ae066987602f20eb6a73", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6255, "upload_time": "2018-06-27T19:46:01", "url": "https://files.pythonhosted.org/packages/f6/56/e23795df79bb4e56f8749a5a60d386d74e1c0d0de394e5bb2a14a9703fdf/shoppinglist-1.0.4.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "1fec0c18227d2e532f90f93e7baaed4b", "sha256": "6cedb0363f4127be420e520ae81cbe11e945e6f4c8536a9b938a655e97168a3a" }, "downloads": -1, "filename": "shoppinglist-1.1.0.tar.gz", "has_sig": false, "md5_digest": "1fec0c18227d2e532f90f93e7baaed4b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6322, "upload_time": "2018-06-28T13:36:53", "url": "https://files.pythonhosted.org/packages/f0/50/e56ec8b5b56fdc47177bc30db4fbe82c6be5c674643b20b969b299432465/shoppinglist-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1fec0c18227d2e532f90f93e7baaed4b", "sha256": "6cedb0363f4127be420e520ae81cbe11e945e6f4c8536a9b938a655e97168a3a" }, "downloads": -1, "filename": "shoppinglist-1.1.0.tar.gz", "has_sig": false, "md5_digest": "1fec0c18227d2e532f90f93e7baaed4b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6322, "upload_time": "2018-06-28T13:36:53", "url": "https://files.pythonhosted.org/packages/f0/50/e56ec8b5b56fdc47177bc30db4fbe82c6be5c674643b20b969b299432465/shoppinglist-1.1.0.tar.gz" } ] }