{"id":18429858,"url":"https://github.com/sartim/mysql-python-import-script","last_synced_at":"2025-04-07T17:33:15.533Z","repository":{"id":36283321,"uuid":"40587833","full_name":"sartim/MySql-Python-Import-Script","owner":"sartim","description":"Python script for importing data from .csv, .xls, or .xlsx to MySQL database.","archived":false,"fork":false,"pushed_at":"2021-07-21T05:56:44.000Z","size":34,"stargazers_count":10,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-22T22:01:36.517Z","etag":null,"topics":["importer","mysql-connector-python","python","python-script","xlrd"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sartim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-12T07:57:25.000Z","updated_at":"2022-12-31T09:05:24.000Z","dependencies_parsed_at":"2022-09-04T13:01:18.608Z","dependency_job_id":null,"html_url":"https://github.com/sartim/MySql-Python-Import-Script","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sartim%2FMySql-Python-Import-Script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sartim%2FMySql-Python-Import-Script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sartim%2FMySql-Python-Import-Script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sartim%2FMySql-Python-Import-Script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sartim","download_url":"https://codeload.github.com/sartim/MySql-Python-Import-Script/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247698023,"owners_count":20981288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["importer","mysql-connector-python","python","python-script","xlrd"],"created_at":"2024-11-06T05:18:51.265Z","updated_at":"2025-04-07T17:33:15.250Z","avatar_url":"https://github.com/sartim.png","language":"Python","readme":"# MySql-Python-Import-Script\nPython script for importing data from .csv, .xls, or .xlsx to MySql database. It requires the headers to run an insert\nquery to database using the headers as the fields.\n\n## Setup\n\n**Requirements**\n \n* [python 2+](https://www.python.org)\n* [virtualenv](https://virtualenv.pypa.io/en/latest/)\n* [mysql-connector-python](https://dev.mysql.com/doc/connector-python/en/connector-python-introduction.html)\n* [xlrd](https://xlrd.readthedocs.io/en/latest/)\n\n**Setup**\n\n    $ virtualenv \u003cenvname\u003e -p python3\n    $ source \u003cenvname\u003e/bin/activate\n    $ pip install -r requirements.txt\n\n**Running script**\n    \n    $ python import.py -h\n    $ python import.py -t spreadsheet -f data/users.xlsx -s source -H hostname.com -U username -P pwd -D db_name\n    $ python import.py -t csv -f data/users.csv -H hostname.com -U username -P pwd -D db_name\n    \n###### arguments\n    \n_-t (type)_\n    \nspreadsheet, csv\n\n_-f (file)_\n\nPath to dataset file \n\n_-s (sheet name)_\n\nUsed if the dataset type in use is a spreadsheet\n\n_-H (host name)_\n\nDatabase host name\n\n_-U (username)_\n\nDatabase username\n\n_-P (password)_\n\nDatabase password\n\n_-D (database name)_\n\nDatabase name","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsartim%2Fmysql-python-import-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsartim%2Fmysql-python-import-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsartim%2Fmysql-python-import-script/lists"}