Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

sartim/MySql-Python-Import-Script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MySql-Python-Import-Script

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.

Setup

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
arguments

-t (type)

spreadsheet, csv

-d (dataset)

Path to dataset

-s (sheet name)

Used if the dataset type in use is a spreadsheet

About

Python script for importing data from .csv, .xls, or .xlsx to MySQL database.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.