Skip to content

jefdaj/electionguard-python

 
 

Repository files navigation

ElectionGuard Python

This is my fork for use in the Cardano integration.

Main changes:

Build Python lib + binaries:

nix build

Dev env that works with Makefile:

nix develop
make fetch-sample-data
make test-nix
make test-careful
make all
# ...

Note that the uv publish targets are untested.

It also works for Python coding:

$ nix develop
$ python
>>> import electionguard
>>> import electionguard_verify
>>> # ...

Build binary and run eg e2e tests with it:

nix flake check

Build and test Docker image as in Makefile. Outputs appear in ./data/out:

nix build .#packages.dockerImage
docker load < result

docker run -v ./data:/data electionguard:1.4.0-py313.nix eg setup \
  --guardian-count=2 --quorum=2 \
  --manifest=/data/election_manifest_simple.json  \
  --package-dir=/data/out/public_encryption_package \
  --keys-dir=/data/out/test_data_private_guardian_data

docker run -v ./data:/data electionguard:1.4.0-py313.nix eg e2e \
  --guardian-count=2 --quorum=2 \
  --manifest=/data/election_manifest_simple.json \
  --ballots=/data/plaintext_ballots_simple.json \
  --spoil-id=25a7111b-4334-425a-87c1-f7a49f42b3a2 \
  --output-record="/data/out/election_record.zip"

About

A python module implementing the ElectionGuard specification. This implementation can be used to conduct End-to-End Verifiable Elections as well as privacy-enhanced risk-limiting audits.

Resources

License

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 91.5%
  • JavaScript 5.9%
  • Makefile 0.7%
  • Nix 0.7%
  • CSS 0.6%
  • HTML 0.3%
  • Dockerfile 0.3%