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 time | |
import requests | |
from hashlib import sha1 | |
import random | |
import string | |
import json | |
""" | |
Make a sample call to the Booli API asking for all listings in 'Nacka' in JSON format, |
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
def exec_sql_file(self, cursor, sql_file): | |
""" | |
Function that executes an SQL script file. Executed query by query by looking through the file and adding | |
elements to 'statement' until if finds the delimiter symbol ';', whilst ignoring comments and | |
stripping space, tab and newline characters. | |
:param cursor: cursor, connected to correct database | |
:param sql_file: string, file location | |
:return: void | |
""" |