from flask import Flask

app = Flask(__name__)

@app.route('/')
def index():
    return 'Hi!'




from flask import Flask, request, jsonify, render_template

from . import dhondt

app = Flask(__name__)

@app.route('/')
def index():
    return 'Hi!'



@app.route('/dhondt')
def calculate_dhondt():
    votes = request.args.getlist('v', type=int)
    result = dhondt(votes, 3)
    return jsonify(result=result)
Add dhondt endpoint