Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import unicodecsv as csv
import json
import os
import time
import requests
from hashlib import sha1
YOUR_INPUT_CSV_FILE = 'foodmarkets.csv'
WOOSMAP_PRIVATE_API_KEY = '23713926-1af5-4321-ba54-032966f6e95d'
BATCH_SIZE = 5
class MyCSVDialect(csv.Dialect):
delimiter = ','
quotechar = '"'
doublequote = True
skipinitialspace = False
lineterminator = '\n'
quoting = csv.QUOTE_ALL
class Woosmap:
"""A wrapper around the Woosmap Data API."""
WOOSMAP_API_HOSTNAME = 'api.woosmap.com'
def __init__(self):
self.session = requests.Session()