Spaces:
Sleeping
Sleeping
File size: 721 Bytes
3240f9f 951ad33 3240f9f 951ad33 3240f9f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | """Run the Python Election Process Assistant."""
from __future__ import annotations
import argparse
import os
try:
from dotenv import load_dotenv
except ModuleNotFoundError: # Optional helper for local .env files.
def load_dotenv() -> bool:
return False
from election_assistant.web import run_server
def main() -> None:
load_dotenv()
parser = argparse.ArgumentParser(description="Run the Python Election Process Assistant")
parser.add_argument("--host", default=os.getenv("HOST", "127.0.0.1"))
parser.add_argument("--port", default=int(os.getenv("PORT", "4173")), type=int)
args = parser.parse_args()
run_server(args.host, args.port)
if __name__ == "__main__":
main()
|