404
+ +Page not found
+ + +diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 09647b1..0000000 --- a/.dockerignore +++ /dev/null @@ -1,4 +0,0 @@ -__pycache__ -*.pyc -*.pyo -*.pyd diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml deleted file mode 100644 index 07cf37c..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: 🐞 Bug -description: Submit a bug if something isn't working as expected. -title: "🐞
Page not found
+ + +This is a python API that provides a thin, stateless wrapper around the electionguard-python library to perform ballot encryption, casting, spoiling, and tallying. This API is implemented using FastAPI.
If you aren't familiar with ElectionGuard and its concepts, take a stroll through the official documentation first!
+The application can run in one of two modes:
+guardian mode runs features used by Guardians (key ceremony actions, partial tally decryption, etc.)mediator mode runs features used by Mediators (ballot encryption, casting, spoiling, etc.)In practice, you will likely need to run at least one instance of each mode. We provide a single codebase and Docker image, but the mode can be set at runtime.
+++NOTE:
+
+🐳 = required for running with Docker.
+🐍 = required for running with Python.
We host a Docker image on both Github Packages and DockerHub.
+Note: GitHub Packages requires authentication to retrieve the package. This requires a GitHub Access Token and using docker login. Follow GitHub instructions.
# Pull the image from DockerHub
+docker pull docker.pkg.github.com/microsoft/electionguard-web-api/electionguard-web-api:main
+
+# Start a container for the API in mediator mode, exposed on port 80 of the host machine
+docker run -d -p 80:8000 --env API_MODE=mediator docker.pkg.github.com/microsoft/electionguard-web-api/electionguard-web-api:main
+
+OR
+# Pull the image from DockerHub
+docker pull electionguard/electionguard-web-api:latest
+
+# Start a container for the API in mediator mode, exposed on port 80 of the host machine
+docker run -d -p 80:8000 --env API_MODE=mediator electionguard/electionguard-web-api:latest
+
+If you run Docker and want to run the code locally without Python dependencies, we provide a Dockerfile and docker-compose.yml.
+Run both APIs at the same time:
+make docker-run
+
+Or run both APIs in development mode, with automatic reloading on file change:
+make docker-dev
+
+After either command, you will find the mediator API running at http://127.0.0.1:8000 and the guardian API at http://127.0.0.1:8001
Using make, installation and startup can be run with one command:
+To set up the environment:
+make environment
+
+To start the api:
+make start API_MODE=mediator
+
+OR
+make start API_MODE=guardian
+
+For local debugging with Visual Studio Code, choose the Guardian Web API or Mediator Web API options from the dropdown in the Run menu. Once the server is up, you can easily hit your breakpoints.
If the code fails to run, make sure your Python interpreter is set to use your poetry environment.
+A Postman collection is available to test the API located in the /tests folder. You can do a few things with this:
bash
+ make docker-testFastApi defaultly has API documentation built in. The following is available after running:
+SwaggerUI at http://127.0.0.1:8000/docs or http://127.0.0.1:8001/docs, depending on the API mode
ReDoc at http://127.0.0.1:8000/redoc or http://127.0.0.1:8001/redoc
Overviews of the API itself are available on:
+ +As of 06/15/2020, the previous C wrapped implementation was transitioned to the python version. ElectionGuard development has transitioned to the ElectionGuard-Python Repo. The old version is available using the dotnet-api tag.
This project encourages community contributions for development, testing, documentation, code review, and performance analysis, etc. For more information on how to contribute, see [the contribution guidelines][contributing]
+This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
+Please report any bugs, feature requests, or enhancements using the GitHub Issue Tracker. Please do not report any security vulnerabilities using the Issue Tracker. Instead, please report them to the Microsoft Security Response Center (MSRC) at https://msrc.microsoft.com/create-report. See the [Security Documentation][security] for more information.
+Electionguard would love for you to ask questions out in the open using GitHub Issues. If you really want to email the ElectionGuard team, reach out at electionguard@microsoft.com.
+This repository is licensed under the [MIT License]
+ +