{ "info": { "author": "Brad Beattie", "author_email": "bradbeattie@gmail com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: GNU General Public License (GPL)", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Topic :: Scientific/Engineering :: Mathematics" ], "description": "Python Vote Core\n================\n\npython-vote-core implements various electoral methods, providing the\nresults calculated off a provided set of ballots and options. *This\nfork implements only Python3 compatibility!*\n\n* Project page: http://github.com/the-maldridge/python-vote-core\n* Issue tracker: http://github.com/the-maldridge/python-vote-core/issues\n\nPython3\n-------\n\nThis fork implements Python3 functionality by using 2to3 and then\ncherry-picking fixes from other people's forks. This is certainly not\na clean way to do so but 100% of the tests pass on Python3.\n\nThis fork exists solely to have a PyPI release under Python3.\n\nMethods implemented\n-------------------\n\n* Single Winner Methods\n\n * Plurality (aka first-past-the-post or fptp)\n * Instant-Runoff Voting (aka IRV)\n * Schulze Method (aka Beatpath)\n\n* Multiple Winner Methods\n\n * Plurality at large (aka block voting)\n * Single Transferable Vote (aka STV)\n * Schulze STV\n\n* Ordering Methods\n\n * Schulze Proportional Representation\n * Schulze Nonproportional Representation\n\nBasic Usage\n-----------\n\nSchulze method example::\n\n >>> from pyvotecore.schulze_method import SchulzeMethod\n >>> from pyvotecore.condorcet import CondorcetHelper\n >>> ballots = [\n ... { \"count\":3, \"ballot\":[[\"A\"], [\"C\"], [\"D\"], [\"B\"]] },\n ... { \"count\":9, \"ballot\":[[\"B\"], [\"A\"], [\"C\"], [\"D\"]] },\n ... { \"count\":8, \"ballot\":[[\"C\"], [\"D\"], [\"A\"], [\"B\"]] },\n ... { \"count\":5, \"ballot\":[[\"D\"], [\"A\"], [\"B\"], [\"C\"]] },\n ... { \"count\":5, \"ballot\":[[\"D\"], [\"B\"], [\"C\"], [\"A\"]] }\n ... ]\n >>> SchulzeMethod(ballots, ballot_notation = CondorcetHelper.BALLOT_NOTATION_GROUPING).as_dict()\n {'actions': [{'edges': {('A', 'B')}},\n {'edges': {('A', 'C')}},\n {'nodes': {'A'}},\n {'edges': {('B', 'C')}},\n {'nodes': {'B', 'D'}}],\n 'candidates': {'A', 'B', 'C', 'D'},\n 'pairs': {('A', 'B'): 16,\n ('A', 'C'): 17,\n ('A', 'D'): 12,\n ('B', 'A'): 14,\n ('B', 'C'): 19,\n ('B', 'D'): 9,\n ('C', 'A'): 13,\n ('C', 'B'): 11,\n ('C', 'D'): 20,\n ('D', 'A'): 18,\n ('D', 'B'): 21,\n ('D', 'C'): 10},\n 'strong_pairs': {('A', 'B'): 16,\n ('A', 'C'): 17,\n ('B', 'C'): 19,\n ('C', 'D'): 20,\n ('D', 'A'): 18,\n ('D', 'B'): 21},\n 'winner': 'C'}\n\n\n20110509.1\n---\n\n- Fixing PyPi release\n\n20110509.0\n---\n\n- Initial PyPi release\n\n\nLicense\n-------\n\nCopyright (C) 2009, Brad Beattie\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see http://www.gnu.org/licenses.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bradbeattie/python-vote-core", "keywords": "library election", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "python3-vote-core", "package_url": "https://pypi.org/project/python3-vote-core/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/python3-vote-core/", "project_urls": { "Homepage": "https://github.com/bradbeattie/python-vote-core" }, "release_url": "https://pypi.org/project/python3-vote-core/20170329.0/", "requires_dist": [ "python-graph-core (>=1.8.0)" ], "requires_python": "", "summary": "An implementation of various election methods, most notably the Schulze Method and Schulze STV. -- Python 3 Only", "version": "20170329.0" }, "last_serial": 2740286, "releases": { "20170329.0": [ { "comment_text": "", "digests": { "md5": "2c98898afa7f7af4f5b697df6067ee3f", "sha256": "bb2b626f6a990a39528b94940601f37c4fcd59892cc0c0e9bb709a47d1e54c65" }, "downloads": -1, "filename": "python3_vote_core-20170329.0-py3-none-any.whl", "has_sig": false, "md5_digest": "2c98898afa7f7af4f5b697df6067ee3f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 46271, "upload_time": "2017-03-30T03:08:48", "url": "https://files.pythonhosted.org/packages/2b/0f/98480dd67f63f33d3a423eb0b96d1a44f1d21028d09a9a37e1498773b47c/python3_vote_core-20170329.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0735047507ff17b5ca3bfef3f1c19c08", "sha256": "a2566482ba5afba5bdafe7069578ccf146ed5ec12c2ef6a88eafeef35740b694" }, "downloads": -1, "filename": "python3-vote-core-20170329.0.tar.gz", "has_sig": false, "md5_digest": "0735047507ff17b5ca3bfef3f1c19c08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 35267, "upload_time": "2017-03-30T03:08:56", "url": "https://files.pythonhosted.org/packages/91/d5/8b85db9e827e21da4cb627c57ff1dfce59ffb2bb4cb9352e97b15b95d181/python3-vote-core-20170329.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2c98898afa7f7af4f5b697df6067ee3f", "sha256": "bb2b626f6a990a39528b94940601f37c4fcd59892cc0c0e9bb709a47d1e54c65" }, "downloads": -1, "filename": "python3_vote_core-20170329.0-py3-none-any.whl", "has_sig": false, "md5_digest": "2c98898afa7f7af4f5b697df6067ee3f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 46271, "upload_time": "2017-03-30T03:08:48", "url": "https://files.pythonhosted.org/packages/2b/0f/98480dd67f63f33d3a423eb0b96d1a44f1d21028d09a9a37e1498773b47c/python3_vote_core-20170329.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0735047507ff17b5ca3bfef3f1c19c08", "sha256": "a2566482ba5afba5bdafe7069578ccf146ed5ec12c2ef6a88eafeef35740b694" }, "downloads": -1, "filename": "python3-vote-core-20170329.0.tar.gz", "has_sig": false, "md5_digest": "0735047507ff17b5ca3bfef3f1c19c08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 35267, "upload_time": "2017-03-30T03:08:56", "url": "https://files.pythonhosted.org/packages/91/d5/8b85db9e827e21da4cb627c57ff1dfce59ffb2bb4cb9352e97b15b95d181/python3-vote-core-20170329.0.tar.gz" } ] }