This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import requests | |
from datetime import datetime, timedelta | |
import json | |
import json_logging | |
import logging | |
import sys | |
# log is initialized without a web framework name | |
json_logging.init_non_web(enable_json=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
from elasticsearch import Elasticsearch | |
import json | |
es = Elasticsearch( | |
) # This will connect with default elasticsearch connection http://localhost:9200 | |
INDEX_NAME = 'favourite-foods' | |
# Create index in the elasticsearch |