CLI interface for running SQL queries with Polars as backend
Project description
Polars CLI
Installation
Until binaries are available, the only way to install the Polars CLI is by building it from source:
cargo +nightly install --locked polars-cli
Alternatively, clone the repository and install the latest version on the main branch:
cargo install --locked --path .
Prerequisites
rustup: which provides thecargoexecutable. You can get it from the official website.rustup install nightly- Thenightlyversion of rust, since some of our dependencies use unstable features.
Usage
$ polars
Polars CLI version 0.3.0
Type .help for help.
>> select * FROM read_csv('examples/datasets/foods1.csv');
┌────────────┬──────────┬────────┬──────────┐
│ category ┆ calories ┆ fats_g ┆ sugars_g │
│ --- ┆ --- ┆ --- ┆ --- │
│ str ┆ i64 ┆ f64 ┆ i64 │
╞════════════╪══════════╪════════╪══════════╡
│ vegetables ┆ 45 ┆ 0.5 ┆ 2 │
│ seafood ┆ 150 ┆ 5.0 ┆ 0 │
│ meat ┆ 100 ┆ 5.0 ┆ 0 │
│ fruit ┆ 60 ┆ 0.0 ┆ 11 │
│ … ┆ … ┆ … ┆ … │
│ seafood ┆ 200 ┆ 10.0 ┆ 0 │
│ seafood ┆ 200 ┆ 7.0 ┆ 2 │
│ fruit ┆ 60 ┆ 0.0 ┆ 11 │
│ meat ┆ 110 ┆ 7.0 ┆ 0 │
└────────────┴──────────┴────────┴──────────┘
Or pipe your SQL command directly inline:
$ echo "SELECT category FROM read_csv('examples/datasets/foods1.csv')" | polars
┌────────────┐
│ category │
│ --- │
│ str │
╞════════════╡
│ vegetables │
│ seafood │
│ meat │
│ fruit │
│ … │
│ seafood │
│ seafood │
│ fruit │
│ meat │
└────────────┘
Features
| Feature | Description |
|---|---|
| default | The default feature set that includes all other features. |
| highlight | Provides syntax highlighting |
| parquet | Enables reading and writing of Apache Parquet files. |
| json | Enables reading and writing of JSON files. |
| ipc | Enables reading and writing of IPC/Apache Arrow files |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file polars_cli-0.4.0.tar.gz.
File metadata
- Download URL: polars_cli-0.4.0.tar.gz
- Upload date:
- Size: 32.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5618fb47aa80aa9d54188654eb806c9be99f77155069386191e30fa23290ed75
|
|
| MD5 |
fc6a0bbd4287ed200bd95f33e1356e6c
|
|
| BLAKE2b-256 |
fc057e396cf985546b8b3f49752e367c76eb332f199f10d9e7825245ba892c36
|
File details
Details for the file polars_cli-0.4.0-py3-none-win_amd64.whl.
File metadata
- Download URL: polars_cli-0.4.0-py3-none-win_amd64.whl
- Upload date:
- Size: 8.9 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8db9c9fe4439c89b3e718f2871518a4bf46d3826cf8eb5d1457bc99d4dc024d
|
|
| MD5 |
b9983873e75f55de3b2072f2202e4129
|
|
| BLAKE2b-256 |
710661e315881cd23bd1a4898179fc4d8daa407bfbc7df311096ff4ce420ec2c
|
File details
Details for the file polars_cli-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: polars_cli-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 10.0 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
441e2f80b2d5b67be5fa05385d13d991a59a0df601f9c62d7c1befddf5723bb8
|
|
| MD5 |
3ccb4213f170c9082877779075e59acc
|
|
| BLAKE2b-256 |
35cc0cfcf47f66017a28ae1f8b07ca541f809c8fb6360efcb5d847cab95fc041
|
File details
Details for the file polars_cli-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: polars_cli-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 8.8 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00330fade78585914cad48d73df83c2e49b4db86ed00fea0ca4ff4e2ff14c4bd
|
|
| MD5 |
f015f651fb9818f87f7caaba901b36d6
|
|
| BLAKE2b-256 |
acff6fb12268f81d04f11645bf165b0cee9ac5dc0e95deca20626d23bcd8d967
|
File details
Details for the file polars_cli-0.4.0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: polars_cli-0.4.0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 7.9 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d2feffe35d145414a8130f67a9b0e4d0a8bd18bc0ab9cf5f67d4eb2edede0c5
|
|
| MD5 |
20025c6441b362d352a01e43a2b0d19e
|
|
| BLAKE2b-256 |
a69b9a4bbc27e2e90d0a152433fdcbc6ba7865910fc3899271a97cb73a814e65
|
File details
Details for the file polars_cli-0.4.0-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: polars_cli-0.4.0-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 9.2 MB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f955d401b1474b778d48142db09aa73e2b57d0e925711a1979f2905111bbc58
|
|
| MD5 |
aaefb6cbaa49fb9c53c030d2bee0f814
|
|
| BLAKE2b-256 |
afbfe23ba3d0e70b87e4c52687efa396047b3502cb84f20afd827e3217ade5cf
|