{ "info": { "author": "Omid Raha", "author_email": "or@omidraha.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2" ], "description": "The Helios Lib\n===============\n\n\nThis is [Helios-Server](https://github.com/benadida/helios-server) (Helios is an end-to-end verifiable voting system.) as library,\n\nThis helios_lib version is completely independent of Django.\n\n\nInstall\n-------\n\n >>> pip install helios_lib\n\n\nTest\n----\n\n >>> pytest --fulltrace -s helios_lib/\n\n\nExample\n-------\n\n```python\nfrom helios_lib.models import HeliosElection, HeliosVoter\nfrom helios_lib.config import ELGAMAL_PARAMS\n\n# Create election\nhelios_election = HeliosElection()\n\n# Add trustee\ntrustee_default = helios_election.generate_helios_trustee(ELGAMAL_PARAMS)\nhelios_election.trustees.append(trustee_default)\n\n# Add questions\nquestion = HeliosElection.create_question(answers_count=5, minimum=0, maximum=2, result_type='relative')\nhelios_election.questions = [question]\n\n# Add voters\nvoters_count = 4\nhelios_election.voters = [HeliosVoter() for _ in range(voters_count)]\n\n# Freeze the election\nhelios_election.freeze()\n\n# Cast votes, Encrypt votes of voters on the helios_lib side\nhelios_election.voters[0].vote = helios_election.encrypt_ballot('[[0,4]]')\nhelios_election.voters[1].vote = helios_election.encrypt_ballot('[[0]]')\nhelios_election.voters[2].vote = helios_election.encrypt_ballot('[[1]]')\nhelios_election.voters[3].vote = helios_election.encrypt_ballot('[[1,4]]')\n\n# Verify votes of voters\nfor v in helios_election.voters:\n v.vote.verify(helios_election)\n\n# Tally election\nhelios_election.num_cast_votes = 4\nhelios_election.compute_tally(helios_election.voters)\nhelios_trustee = helios_election.get_helios_trustee()\nhelios_election.helios_trustee_decrypt(helios_trustee)\nhelios_election.combine_decryptions()\n\n# Result of election\nassert helios_election.result == [[2, 2, 0, 0, 2]]\n\n```\n\n\n\nFor more complex example refer to tests\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/anarvote/helios_lib", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "helios-lib", "package_url": "https://pypi.org/project/helios-lib/", "platform": "", "project_url": "https://pypi.org/project/helios-lib/", "project_urls": { "Homepage": "https://github.com/anarvote/helios_lib" }, "release_url": "https://pypi.org/project/helios-lib/0.0.1/", "requires_dist": [ "pytest (==3.6.2)" ], "requires_python": "", "summary": "Helios Server (Helios is an end-to-end verifiable voting system) as library", "version": "0.0.1" }, "last_serial": 4412481, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "18b8cefeb13e53f346df64c99e4535d4", "sha256": "cf76e601b896289f12d2dd26c7b888ea245d5287b125155d1db8b4a64df26514" }, "downloads": -1, "filename": "helios_lib-0.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "18b8cefeb13e53f346df64c99e4535d4", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 55733, "upload_time": "2018-10-24T19:50:15", "url": "https://files.pythonhosted.org/packages/22/60/9a388845667e9d62a228c6c71584aa49de365dec17d67e6918abca28758a/helios_lib-0.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9ee33da2ec4d83d440544b5eff5b34f7", "sha256": "49ff561de69cc481c8a9e77c39dcf12a9a6e50c51168b8339786eba293053ab7" }, "downloads": -1, "filename": "helios_lib-0.0.1.tar.gz", "has_sig": false, "md5_digest": "9ee33da2ec4d83d440544b5eff5b34f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 46947, "upload_time": "2018-10-24T19:50:17", "url": "https://files.pythonhosted.org/packages/29/43/3e72e64f493ba411b24ddf65bd24b6a94a3a8335d5e7bb46d4829c032b06/helios_lib-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "18b8cefeb13e53f346df64c99e4535d4", "sha256": "cf76e601b896289f12d2dd26c7b888ea245d5287b125155d1db8b4a64df26514" }, "downloads": -1, "filename": "helios_lib-0.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "18b8cefeb13e53f346df64c99e4535d4", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 55733, "upload_time": "2018-10-24T19:50:15", "url": "https://files.pythonhosted.org/packages/22/60/9a388845667e9d62a228c6c71584aa49de365dec17d67e6918abca28758a/helios_lib-0.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9ee33da2ec4d83d440544b5eff5b34f7", "sha256": "49ff561de69cc481c8a9e77c39dcf12a9a6e50c51168b8339786eba293053ab7" }, "downloads": -1, "filename": "helios_lib-0.0.1.tar.gz", "has_sig": false, "md5_digest": "9ee33da2ec4d83d440544b5eff5b34f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 46947, "upload_time": "2018-10-24T19:50:17", "url": "https://files.pythonhosted.org/packages/29/43/3e72e64f493ba411b24ddf65bd24b6a94a3a8335d5e7bb46d4829c032b06/helios_lib-0.0.1.tar.gz" } ] }