@dhruvdutt/

Appbase.io - Python - get

Python 2.7

GET operations (or Read) for fetching data and queries

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import requests
import json

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

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

response = requests.request("GET", url, headers=headers)

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