queryutils.csvparser

queryutils.csvparser.get_csv_files(dir, limit=2097152000)[source]

Return the paths to all the .csv files in the given directory.

Parameters:
  • dir (str) – The path to the given directory
  • limit (int) – The approximate number of bytes to read in (for testing)
Return type:

list

queryutils.csvparser.get_users_from_directory(directory, users, limit=2097152000)[source]

Populate the users dict with users from the .csv files.

Parameters:
  • directory (str) – The path to the directory containing the .csv files
  • users (dict) – The dict to contain the users read from the .csv files
  • limit (int) – The approximate number of bytes to read in (for testing)
Return type:

None

queryutils.csvparser.get_users_from_file(filename, users)[source]

Populate the users dictionary with users and their queris from the given file.

Parameters:
  • filename (str) – The .csv file containing user queries
  • users (dict) – The user dict into which to place the users
Return type:

None