Skip to content

amoghmadan/Table2JSON

Repository files navigation

Table2JSON

Convert Tabular Data to JSON

Python 3.7 <= 3.X < 3.11

Setup CSV and SQLite (Basic Installation)

pip install table2json  # Setup CSV and SQLite by Default

Setup (All Installation)

pip install table2json[all]  # Setup All

Debian [Ubuntu, Mint and Others]

sudo apt-get install python3.X-venv python3.X-dev libssl-dev libmysqlclient-dev build-essential

Note (Python): Replace X with Python Minor Version

Redhat [CentOS, Rocky, Fedora and Others]

sudo yum install python3.X python3.X-devel ssl-devel mysql-devel

Note (Python): Replace X with Python Minor Version

Note (Fedora): Replace yum with dnf

Caution: Not a tried and tested method but known to work. If mysql-devel thing does not work replace mysqlclient package with pymysql package in the requirements.txt, setup.cfg, tox.ini and the mysql.py file.

Windows

Download, MS VS C++ Redistributable: Microsoft Visual Studio C++ Redistributable

Download, Python 3.X: Python 3.X

Note (Python): Replace X with Python Minor Version

Requirements [Build]

pip install -r requirements.txt

Requirements [Development]

pip install -r requirements.txt
pip install -r requirements/generic/common.txt
pip install -r requirements/generic/csv.txt
pip install -r requirements/generic/excel.txt
pip install -r requirements/generic/mysql.txt
pip install -r requirements/generic/neo4j.txt
pip install -r requirements/generic/sqlite.txt

Generate [Build (Distribution and Wheel)]

tox -c . -e py3X-build

Note: Replace X with Python Minor Version

Install [Wheel]

cd dist
pip install Table2JSON-{version}-py3X-none-any.whl[all]  # All Optionals Will Be Installed

Note: Replace X with Python Minor Version

Generate [Executable]

tox -c . -e py3X-build-exe  # All Optionals Will Be Installed

Note (Python): Replace X with Python Minor Version

Help

Table2JSON -h

CSV

Table2JSON csv -h

Excel

Table2JSON excel -h

MySQL

Table2JSON mysql -h

Neo4j

Table2JSON neo4j -h

SQLite

Table2JSON sqlite -h