SW ENGINEERING/Flask
API 개발하기(8) - 미니터(Miniter) 개발하기(전문)
app.py import os from flask import Flask, jsonify, request from flask.json import JSONEncoder class CustomJSONEncoder(JSONEncoder): # 1 def default(self, obj): if isinstance(obj, set): return list(obj) return JSONEncoder.default(self, obj) app = Flask(__name__) app.users = {} app.id_count = 1 app.tweets = [] app.json_encoder = CustomJSONEncoder @app.route("/ping", methods=["GET"]) def ping(): re..
2021. 2. 16. 23:27
최근댓글