loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.17784333201291758","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"aW1wb3J0IHJlcXVlc3RzCmltcG9ydCBqc29uCmltcG9ydCBkZW1qc29uCgp1cmwgPSAiaHR0cHM6Ly9zY2Fsci5hcGkuYXBwYmFzZS5pby9ob3VzaW5nLWRlbW8vbGlzdGluZy9fc2VhcmNoIgoKcGF5bG9hZCA9IGRlbWpzb24uZW5jb2RlKHsKICAicXVlcnkiOnsKICAgICJtYXRjaF9hbGwiOiB7fQogIH0KfSkKCmhlYWRlcnMgPSB7CiAgICAnQXV0aG9yaXphdGlvbic6ICJCYXNpYyBXVzVEWjFaM2IzcFdPbVU1WldNMVkySXdMVFU0WkRndE5HSmlNQzFpWVdSakxXRmpZV1kzTWpZMk5qRm1NUT09IiwKICAgICdDb250ZW50LVR5cGUnOiAiYXBwbGljYXRpb24vanNvbiIKICAgIH0KCnJlc3BvbnNlID0gcmVxdWVzdHMucmVxdWVzdCgiUE9TVCIsIHVybCwgZGF0YT1wYXlsb2FkLCBoZWFkZXJzPWhlYWRlcnMpCgpwYXJzZWQgPSBqc29uLmxvYWRzKHJlc3BvbnNlLnRleHQpCnByaW50IGpzb24uZHVtcHMocGFyc2VkLCBpbmRlbnQ9Miwgc29ydF9rZXlzPVRydWUp"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import requests
import json
import demjson

url = "https://scalr.api.appbase.io/housing-demo/listing/_search"

payload = demjson.encode({
  "query":{
    "match_all": {}
  }
})

headers = {
    'Authorization': "Basic WW5DZ1Z3b3pWOmU5ZWM1Y2IwLTU4ZDgtNGJiMC1iYWRjLWFjYWY3MjY2NjFmMQ==",
    'Content-Type': "application/json"
    }

response = requests.request("POST", url, data=payload, headers=headers)

parsed = json.loads(response.text)
print json.dumps(parsed, indent=2, sort_keys=True)