Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zblesk/csv-to-sqlite
A command-line tool that copies data from CSV files into a SQLite database.
https://github.com/zblesk/csv-to-sqlite
command-line converter python3 sqlite tools
Last synced: 2 days ago
JSON representation
A command-line tool that copies data from CSV files into a SQLite database.
- Host: GitHub
- URL: https://github.com/zblesk/csv-to-sqlite
- Owner: zblesk
- License: mit
- Created: 2016-02-24T10:09:56.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-02-28T10:47:37.000Z (10 months ago)
- Last Synced: 2024-12-24T10:18:59.696Z (4 days ago)
- Topics: command-line, converter, python3, sqlite, tools
- Language: Python
- Size: 58.6 KB
- Stars: 74
- Watchers: 7
- Forks: 18
- Open Issues: 4
-
Metadata Files:
- Readme: ReadMe.md
- License: LICENSE.txt
Awesome Lists containing this project
README
csv-to-sqlite
=============This is a simple, **datatype-guessing** script that takes CSV files as input and copies their contents into a SQLite database.
(Column names are taken from the headers (first row) in the csv file.)
Intended for **Python 3**. (I know it *did* run on Py2 as some people tried, but I haven't tested it.)## Links
* [Source on GitHub](https://github.com/zblesk/csv-to-sqlite)
* [PyPI page](https://pypi.org/project/csv-to-sqlite/)
* [Introductory blog post with basic intro + a how-to](http://zblesk.net/blog/csv-to-sqlite/)
* [Other related blog posts](https://zblesk.net/blog/tag/csv-to-sqlite/)## Overview
Installs via
```
pip install csv-to-sqlite
```To find out more, run
```
csv-to-sqlite --help
```If you've installed the package as a dependency for your own script, you can use it like this:
```python
import csv_to_sqlite# all the usual options are supported
options = csv_to_sqlite.CsvOptions(typing_style="full", encoding="windows-1250")
input_files = ["abilities.csv", "moves.csv"] # pass in a list of CSV files
csv_to_sqlite.write_csv(input_files, "output.sqlite", options)
```