loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.3809200125391592","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"aW1wb3J0IHJlcXVlc3RzCmltcG9ydCBqc29uCmltcG9ydCBkZW1qc29uCgp1cmwgPSAiaHR0cHM6Ly9zY2Fsci5hcGkuYXBwYmFzZS5pby9ob3VzaW5nLWRlbW8vbGlzdGluZy9fc2VhcmNoIgoKcGF5bG9hZCA9IGRlbWpzb24uZW5jb2RlKHsKICAicXVlcnkiOiB7CiAgICAicmFuZ2UiOiB7CiAgICAgICJwcmljZSI6IHsKICAgICAgICAiZ3RlIjogNTAsCiAgICAgICAgImx0ZSI6IDEwMAogICAgICB9CiAgICB9CiAgfQp9KQoKaGVhZGVycyA9IHsKICAnQXV0aG9yaXphdGlvbic6ICJCYXNpYyBXVzVEWjFaM2IzcFdPbVU1WldNMVkySXdMVFU0WkRndE5HSmlNQzFpWVdSakxXRmpZV1kzTWpZMk5qRm1NUT09IiwKICAnQ29udGVudC1UeXBlJzogImFwcGxpY2F0aW9uL2pzb24iCn0KCnJlc3BvbnNlID0gcmVxdWVzdHMucmVxdWVzdCgiUE9TVCIsIHVybCwgZGF0YT1wYXlsb2FkLCBoZWFkZXJzPWhlYWRlcnMpCgpwYXJzZWQgPSBqc29uLmxvYWRzKHJlc3BvbnNlLnRleHQpCnByaW50IGpzb24uZHVtcHMocGFyc2VkLCBpbmRlbnQ9Miwgc29ydF9rZXlzPVRydWUp"},"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
22
23
24
25
26
import requests
import json
import demjson

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

payload = demjson.encode({
  "query": {
    "range": {
      "price": {
        "gte": 50,
        "lte": 100
      }
    }
  }
})

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)