Skip to main content

sql-to-csv-to-sql

A Simple Command Line Utility for converting SQL statements to CSV and vice versa.

Installation

pip install sqlcsvsql

Usage

usage: __main__.py [-h] [-f FILEPATH] [-t TABLE_NAME] [-o OUTPUT] [-m {single,multi}] [-s {y,n}]

optional arguments:
  -h, --help            show this help message and exit
  -f FILEPATH, --filepath FILEPATH
                        SQL or CSV file path
  -t TABLE_NAME, --table-name TABLE_NAME
                        Table name for csv file
  -o OUTPUT, --output OUTPUT
                        Output filepath. Must end with extension
  -m {single,multi}, --statement_mode {single,multi}
                        single or multiline DML to generate
  -s {y,n}, --surround {y,n}
                        surround values with single quote. For a CSV with columns A,B,C if only B column's values should be surrounded with quotes, then use ```--surround n,y,n```. By default, all values are
                        surrounded.

Convert SQL to CSV

python -m sqlcsvsql -f file.sql

the converted file will be saved in the same directory with file name file.sql.csv

Convert CSV to SQL

python -m sqlcsvsql -f file.csv -t example_table -m single

the converted file will be saved in the same directory with file name file.csv.sql

Metadata

Release files for sqlcsvsql 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqlcsvsql 0.0.2
File Size Uploaded Provenance
sqlcsvsql-0.0.2.tar.gz 18.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sqlcsvsql 0.0.2
File Interpreter ABI Platform
sqlcsvsql-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 38.2 kB

Release files / sqlcsvsql-0.0.2.tar.gz

Download URL sqlcsvsql-0.0.2.tar.gz
Size 18.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5a99d2e49768b7d061cc9bd317b533bc3f109f53cedac3b5fdb402878ce9b4d3
BLAKE2b-256 checksum
How to use checksums
dd30f4019207288a3495a5e6b0dfe4e88f1dca49bce92cae0ff44b2f3b635c4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

Release files / sqlcsvsql-0.0.2-py3-none-any.whl

Download URL sqlcsvsql-0.0.2-py3-none-any.whl
Size 19.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
99f8d23da6d72ceefe9963e3bb2f870a28910319bdfa2ab21460bc2c6e710614
BLAKE2b-256 checksum
How to use checksums
d4f346f5c7c817586207a1976c9d1a32a860708e7a153b87f2091883c9b802ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

Security for sqlcsvsql 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page