{ "info": { "author": "Dave Lundgren, Connor Riva, Tjaart van der Walt", "author_email": "dlungren@outsideopen.com, criva@westmont.edu, tjaart@outsideopen.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "History Set\n===========\n\nA Set implementation that tracks added and removed elements.\n\nUsage\n-----\n\n.. code:: python\n\n >>> from history_set import HistorySet\n >>> history_set = HistorySet([1, 2, 3])\n >>> history_set.add(4)\n >>> history_set # Prints: {1, 2, 3, 4}\n >>> history_set.added() # Prints: {4}\n >>> history_set.remove(1)\n >>> history_set # Prints: {2, 3, 4}\n >>> history_set.removed() # Prints: {1}\n >>> history_set.reset()\n >>> history_set.added() # Prints: set()\n >>> history_set.removed() # Prints: set()\n\nSpecial case\n------------\n\nBy default, if an element is added and later removed, it will not be\ntracked in history\n\n.. code:: python\n\n >>> history_set = HistorySet([1, 2, 3])\n >>> history_set.add(4)\n >>> history_set.remove(4)\n >>> history_set.added() # Prints: set()\n >>> history_set.removed() # Prints: set()\n\nIf you require these elements to be tracked, you can construct the\nobject with the ``eidetic`` keyword argument\n\n.. code:: python\n\n >>> history_set = HistorySet([1, 2, 3], eidetic=True)\n >>> history_set.add(4)\n >>> history_set.remove(4)\n >>> history_set.added() # Prints: {4}\n >>> history_set.removed() # Prints: {4}\n\n--------------\n\nBy default, the ``reset()`` method will clear the entire history\n\n.. code:: python\n\n >>> history_set = HistorySet([1, 2, 3])\n >>> history_set.add(4)\n >>> history_set.added() # Prints: {4}\n >>> history_set.remove(2)\n >>> history_set.removed() # Prints: {2}\n >>> history_set.reset()\n >>> history_set.added() # Prints: set()\n >>> history_set.removed() # Prints: set()\n\nIf you require reseting only the ``added()`` or ``removed()`` history,\nyou can call the ``reset`` method with ``added`` or ``removed`` booleans\nvalues to specify which history you with to reset\n\n.. code:: python\n\n >>> history_set = HistorySet([1, 2, 3])\n >>> history_set.add(4)\n >>> history_set.added() # Prints: {4}\n >>> history_set.remove(2)\n >>> history_set.removed() # Prints: {2}\n >>> history_set.reset(added=True)\n >>> history_set.added() # Prints: set()\n >>> history_set.removed() # Prints: {2}\n\nTest\n----\n\nYou can run the tests using\n`tox `__\n\n.. code:: shell\n\n tox\n\nPublish\n-------\n\nTo publish a new version of this package your Pypi user needt to be\nadded to the project. (Ask Tjaart to give you access)\n\n.. code:: shell\n\n # Update version number in setup.py\n\n python setup.py sdist\n twine upload dist/*", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/westmont/history_set", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "history-set", "package_url": "https://pypi.org/project/history-set/", "platform": "", "project_url": "https://pypi.org/project/history-set/", "project_urls": { "Homepage": "https://bitbucket.org/westmont/history_set" }, "release_url": "https://pypi.org/project/history-set/0.1.5/", "requires_dist": null, "requires_python": "", "summary": "A Set implementation that tracks added and removed elements.", "version": "0.1.5" }, "last_serial": 4083189, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "0107267a35d2ab0d7124abd9b44e130d", "sha256": "1f04a7682c9395ce752fa84702feb314e164b9df5e529872123c285d2682c7ad" }, "downloads": -1, "filename": "history-set-0.1.tar.gz", "has_sig": false, "md5_digest": "0107267a35d2ab0d7124abd9b44e130d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1711, "upload_time": "2018-02-28T02:03:50", "url": "https://files.pythonhosted.org/packages/68/2b/a5d96c96d4ffa4aa7b02a2e35f90c6134149d649f27147f5e2a451940e04/history-set-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "58aadc6d49685a53073aaa3a71ac42f8", "sha256": "68c28c2eedfcb0551aed611a4ecb0fb7846f49ef85a8df393e12da2cdca474c3" }, "downloads": -1, "filename": "history-set-0.1.1.tar.gz", "has_sig": false, "md5_digest": "58aadc6d49685a53073aaa3a71ac42f8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2143, "upload_time": "2018-02-28T02:32:19", "url": "https://files.pythonhosted.org/packages/3d/53/aa5748cfa7f153bf4fbc1d78a50aa26586fe8f18fc419ec141bebe58961b/history-set-0.1.1.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "ea7a28540e39e4bbfecdc167184e29d3", "sha256": "7df5d763c3e6f8dcfc8aaed3f61ecbde463a2e2dcc8c13faa11bef9891cfc2f6" }, "downloads": -1, "filename": "history-set-0.1.3.tar.gz", "has_sig": false, "md5_digest": "ea7a28540e39e4bbfecdc167184e29d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2436, "upload_time": "2018-03-01T21:10:00", "url": "https://files.pythonhosted.org/packages/79/97/3809c5fba3c62bf23e2b9beb5d9ace8d7b458753c7e5c26f3611d8e525f9/history-set-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "3b94b489aa4f1cffdc61390c095d4c62", "sha256": "b046ea1b2f043c6c3e0b774e96f332e4730b9343d4f84fcb95abdd84b6d22847" }, "downloads": -1, "filename": "history-set-0.1.4.tar.gz", "has_sig": false, "md5_digest": "3b94b489aa4f1cffdc61390c095d4c62", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2119, "upload_time": "2018-03-07T18:06:21", "url": "https://files.pythonhosted.org/packages/5d/45/6697b4095aec6f1e4c91899a6dae7d9822c54a2f44652e6594fa551d460b/history-set-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "beebf1305b44a39f7e0310a3de0cd884", "sha256": "c8e163e2ae0f709fca0f19f6b0211349e34ec5b30ea82dd40d94acd388996795" }, "downloads": -1, "filename": "history-set-0.1.5.tar.gz", "has_sig": false, "md5_digest": "beebf1305b44a39f7e0310a3de0cd884", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2457, "upload_time": "2018-03-07T18:09:41", "url": "https://files.pythonhosted.org/packages/81/be/aa2167da61f7191580235fd55fea6a488a24eccf1ab84058e4a3bc59ee8a/history-set-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "beebf1305b44a39f7e0310a3de0cd884", "sha256": "c8e163e2ae0f709fca0f19f6b0211349e34ec5b30ea82dd40d94acd388996795" }, "downloads": -1, "filename": "history-set-0.1.5.tar.gz", "has_sig": false, "md5_digest": "beebf1305b44a39f7e0310a3de0cd884", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2457, "upload_time": "2018-03-07T18:09:41", "url": "https://files.pythonhosted.org/packages/81/be/aa2167da61f7191580235fd55fea6a488a24eccf1ab84058e4a3bc59ee8a/history-set-0.1.5.tar.gz" } ] }