Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Fake API server
import os
from flask import Flask, jsonify
app = Flask(__name__)
@app.route('/api-token-auth/', methods=['POST'])
def auth():
# Token generated via
return jsonify({
if __name__ == '__main__':'FLASK_SERVER_PORT', 8001))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment