Python
15
Вклад в тег
import json
from flask import Flask
test_dict = {"foo": "var"}
json_ = json.dumps(test_dict, indent=4)
app = Flask(__name__)
@app.route('/')
def index():
return json_
app.run()
import requests
request = requests.get(IP)
dict_ = request.json()