clidb-0.2.3
توضیحات
CLI based SQL client for local data
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | clidb-0.2.3 |
| نام | clidb |
| نسخه کتابخانه | 0.2.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Danny Boland |
| ایمیل نویسنده | danny@boland.dev |
| آدرس صفحه اصلی | https://github.com/dannyboland/clidb |
| آدرس اینترنتی | https://pypi.org/project/clidb/ |
| مجوز | MIT |
# clidb

clidb is a command line sql client for individual data files, allowing these to be queried (even joined) and viewed. It natively supports CSV and parquet formats, with support for other file types available via the optional extras dependency.
## Data Formats
The following file types can be opened as views in clidb without extras:
- csv
- parquet(.gz)
With pandas installed, the following are also supported:
- json(l)
- xls(x)
- clipboard
- ...
## Usage
This package can be installed with:
```bash
pip install "clidb[extras]"
```
and executed via:
```bash
clidb
```
### Arguments
If a filename is supplied as an argument to clidb then it will open the data file as a view.
If a directory or S3 path is supplied then the directory view will open in that location.
For example:
```bash
clidb data/iris.csv
```
or
```bash
clidb s3://somebucket/data/
```
The contents of the clipboard can be converted into a view (e.g. after copying from Google Sheets), using the `--clipboard` argument:
```bash
clidb --clipboard
```
For some data sources, it can be helpful to render lines that separate rows. This can be enabled via the `row-lines` option:
```bash
clidb --row-lines
```
## Advanced Usage
New views can be created from an opened file. For example if `iris.csv` was opened as the view `iris`, then we could create a new view:
```sql
create view iris_variety as (select variety, avg("petal.length") from iris group by variety)
```

Views can be joined together, for example:
```sql
select * from iris natural join iris_variety
```

نیازمندی
| مقدار | نام |
|---|---|
| ==0.1.18 | textual |
| >=0.2.0,<0.3.0 | textual-inputs |
| >=0.3.2,<0.4.0 | duckdb |
| >=1.3,<2.0) | pandas |
| >=7.0.0,<8.0.0) | pyarrow |
| >=2022.2.0,<2023.0.0) | fsspec |
| >=1.20,<2.0) | boto3 |
| >=2022.2.0,<2023.0.0) | s3fs |
| >=2.0.1,<3.0.0) | xlrd |
| >=3.0.9,<4.0.0) | openpyxl |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8,<4.0 | Python |
نحوه نصب
نصب پکیج whl clidb-0.2.3:
pip install clidb-0.2.3.whl
نصب پکیج tar.gz clidb-0.2.3:
pip install clidb-0.2.3.tar.gz