{ "info": { "author": "Chris Martin", "author_email": "ch.martin@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "For example, this sequence of events ...\n\n- A: *$10*\n- B: *$10*\n- C: *($18)*\n- D: *($2)*\n\n... is turned into this timeline::\n\n A B C D\n | | | |\n |_____________|_____________| |\n | | |\n | $10 | |\n |___________________________| |\n | | |\n | $8 | |\n |_____________|_____________|\n | |\n | $2 |\n |___________________________|\n\nThis lets you determine, for each balance reduction event, the events from\nwhich the balance was added. In this example, we can see that:\n\n- The $18 reduction in event C came from $10 of event A and $8 of B.\n- The $2 reduction in event D came entirely from event B.\n\nCode for this example:\n\n.. code:: python\n\n from refund_calculation import *\n\n history_from_event_sequence([\n Event(time='A', delta='10'),\n Event(time='B', delta='10'),\n Event(time='C', delta='-18'),\n Event(time='D', delta='-2'),\n ])\n\n # Result:\n History(\n closed=(\n Closed(amount=Decimal('10'), start='A', end='C'),\n Closed(amount=Decimal('8'), start='B', end='C'),\n Closed(amount=Decimal('2'), start='B', end='D'),\n ),\n open=(),\n debt=Decimal('0'),\n )", "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/chris-martin/refund-calculation", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "refund_calculation", "package_url": "https://pypi.org/project/refund_calculation/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/refund_calculation/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/chris-martin/refund-calculation" }, "release_url": "https://pypi.org/project/refund_calculation/0.1/", "requires_dist": null, "requires_python": null, "summary": "Turns a chronological sequence of balance-adjustment events into a timeline of periods during which particular balances were held.", "version": "0.1" }, "last_serial": 1254670, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "083972d22f9e080530d31918cf86ffd2", "sha256": "ac724f169a5542c97b15e5528671278e3d42e84ba1e24223f78e27b08cc431a8" }, "downloads": -1, "filename": "refund_calculation-0.1.tar.gz", "has_sig": false, "md5_digest": "083972d22f9e080530d31918cf86ffd2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3673, "upload_time": "2014-10-10T19:45:57", "url": "https://files.pythonhosted.org/packages/c9/fa/ad4b2c48a4078ad8fa20ff96483e12d9aae8e54625d14d1eb4de6a5df494/refund_calculation-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "083972d22f9e080530d31918cf86ffd2", "sha256": "ac724f169a5542c97b15e5528671278e3d42e84ba1e24223f78e27b08cc431a8" }, "downloads": -1, "filename": "refund_calculation-0.1.tar.gz", "has_sig": false, "md5_digest": "083972d22f9e080530d31918cf86ffd2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3673, "upload_time": "2014-10-10T19:45:57", "url": "https://files.pythonhosted.org/packages/c9/fa/ad4b2c48a4078ad8fa20ff96483e12d9aae8e54625d14d1eb4de6a5df494/refund_calculation-0.1.tar.gz" } ] }