{"id":34108296,"url":"https://github.com/clcert/psifospoll","last_synced_at":"2026-04-10T10:31:33.811Z","repository":{"id":213157643,"uuid":"732061883","full_name":"clcert/psifospoll","owner":"clcert","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-20T16:39:21.000Z","size":20,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-17T01:30:31.317Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clcert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-12-15T14:46:24.000Z","updated_at":"2024-01-11T21:56:37.000Z","dependencies_parsed_at":"2024-01-30T02:41:43.045Z","dependency_job_id":"ad7c9d90-a457-4c80-9514-45c6ea55c59d","html_url":"https://github.com/clcert/psifospoll","commit_stats":null,"previous_names":["clcert/psifospoll"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/clcert/psifospoll","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clcert%2Fpsifospoll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clcert%2Fpsifospoll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clcert%2Fpsifospoll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clcert%2Fpsifospoll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clcert","download_url":"https://codeload.github.com/clcert/psifospoll/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clcert%2Fpsifospoll/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31638389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-14T18:15:58.394Z","updated_at":"2026-04-10T10:31:33.801Z","avatar_url":"https://github.com/clcert.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PsifosPoll: Library for Election Result Algorithms\nPsifosPoll is a Python library developed by the electronic voting system Psifos team. For more information about our work, visit the Psifos Participa UChile instance page: [Participa UChile](https://participa.uchile.cl/).\n\n## Description\nPsifosPoll is a Python library designed to contain different algorithms for calculating the result of an election. \n\nCurrently, the library includes the algorithm for preferential ranking voting, *Single Transferable Vote (STV)*, in its *Weighted Inclusive Gregory Method* version with a *droop quota*.\n\n## Resources\n- STV Versions: For more information about different versions of STV, it is recommended to consult the paper [DETERMINING THE RESULT: Transferring Surplus Votes in the Western Australian Legislative Council](https://research.monash.edu/en/publications/determining-the-result-transferring-surplus-votes-in-the-western-)\n\n- PsifosPoll Implementation: If you want to learn more about the version of STV implemented by this library, we suggest reviewing the paper [Shuffle-Sum: Coercion-Resistant Verifiable Tallying for STV Voting](https://ieeexplore.ieee.org/abstract/document/5282564) in section I.c.\n\n## Installation\nYou can install PsifosPoll using the pip package manager. Run the following command in your terminal:\n\n```bash\n$ pip install psifospoll\n```\n\n### Usage Example\nHere is a basic example of how to use PsifosPoll with STV:\n\n```python\nfrom psifospoll import STVElection\n\ndef stvTally(seats, candidates_list, ballot_list):\n    election = STVElection()\n    election.runElection(seats, candidates_list, ballot_list)\n    print(election.getRoundResumes())\n    print(election.getTalliesResumes())\n    print(election.getWinnersList())\n    print(election.getQuota())\n\n# Voting example\n# Three seats, five candidates and six ballots\nl1 = [\n    [1, 2, 3, 4, 5],\n    [5, 4, 3, 2, 1],\n    [2, 3, 4, 5, 1],\n    [3, 4, 5, 1, 2],\n    [4, 5, 1, 2, 3],\n    [1, 2, 3, 4, 5],\n]\ncand = [1, 2, 3, 4, 5]\nstvTally(3, cand, l1)\n# In this example, STV runs for 3 rounds, and candidates 1, 3 and 4 are elected.\n```\n\n### More Examples\nYou can find more examples of possible inputs for STV in the examples.py file of the library.\n\n## Contributions\nWe would love to receive contributions! If you want to make a Pull Request (PR), make sure the code used is formatted with the black library. You can do this by running the following command in the PsifosPoll directory:\n\n```\nblack .\n```\n\n## Contact\nIf you have any questions, feel free to contact us at participa@uchile.cl\n\nThank you for using PsifosPoll!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclcert%2Fpsifospoll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclcert%2Fpsifospoll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclcert%2Fpsifospoll/lists"}