-
Notifications
You must be signed in to change notification settings - Fork 5
Dynamic
anandam1992 edited this page May 21, 2018
·
1 revision
We used simple Python-based code to parse the data out of the data source. This helped us to use Python-based libraries like Request in our code. Using the same we were also free to store the data in the required format i.e., the xls/json/csv formats to store the data and further post the data to the platform used (DNIF).
Python Commands: Libraries Used-
- Schedule
- Time
- BeautifulSoup4 (bs4)
- Request
- Urlopen
- Csv
- Json
The code uses simple Request Library functions to POST the data from the updated JSON file to the URL of the DNIF datastore location.
headers = {'content-type': 'application/json'}
url = 'http://192.168.0.104:9234/json/receive'
data=json.dumps(out)
requests.post(url, out)
r=requests.post(url, out)