Metadata-Version: 2.1
Name: cqlite
Version: 0.2.0
Summary: Query a CSV file from the commandline
Author-email: Emil Kloeden <emilkloeden@gmail.com>
Project-URL: Homepage, https://github.com/emilkloeden/cqlite
Project-URL: Bug Tracker, https://github.com/emilkloeden/cqlite/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer (==0.7.0)
Requires-Dist: rich (==12.6.0)

# cqlite

Query a CSV file from the commandline

## Installation

`pipx install cqlite`

## Usage

In memory query:

```sh
cqlite <csv_file> <query>
```

e.g.

```sh
cqlite fakedata.csv "SELECT * FROM csv WHERE name LIKE '%Tommy% AND date_of_birth < '1980-01-01';"
```

(note filedata is loaded into a table called "csv").

Save `<csv_file>.csv as a SQLite database (<csv_file>.db):

```sh
cqlite <csv_file> --persist
```
