devalbot / utils.py
gtani's picture
Refactor chat functionality and update dependencies
f904c62
raw
history blame contribute delete
305 Bytes
import csv
def load_users(path):
"""
Reads a CSV with header 'users,passwords'
and returns a list of (user, password) tuples.
"""
with open(path, newline="", encoding="utf-8") as f:
reader = csv.DictReader(f)
return [(row["users"], row["passwords"]) for row in reader]