import config
from eve import Eve
from eve.auth import BasicAuth

class MyBasicAuth(BasicAuth):
    def check_auth(self, username, password, allowed_roles, resource, method):
        return username == config.username and password == config.password

app = Eve(auth=MyBasicAuth)

if __name__ == '__main__':
    app.run(
            host=config.host,
            port=config.port,
            debug=config.debug
            )
