This is a python script for importing data to MySql database using .csv, .xls, or xlsx. It requires MySQLdb interface for python and xlrd package for reading data and formatting information from older Excel files.
Requirements
Setup
$ virtualenv <envname> -p python3
$ source <envname>/bin/activate
$ pip install -r requirements.txt
Add dotenv to project root
You should create a .env file on the project root. You can get this on the repo url https://github.com/hivisasapro/hivisasa-stage-dotenv
Running script
$ python import.py -t XLSX -d data/users.xlsx -s source
-t (type)
spreadsheet, csv
-d (dataset)
Path to dataset
-s (sheet name)
Used if the dataset type in use is a spreadsheet