Name | polars-cli JSON |
Version |
0.8.0
JSON |
| download |
home_page | None |
Summary | CLI interface for running SQL queries with Polars as backend |
upload_time | 2024-06-03 07:44:21 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT |
keywords |
dataframe
arrow
out-of-core
sql
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Polars CLI
[![Crates.io](https://img.shields.io/crates/v/polars-cli)](https://crates.io/crates/polars-cli)
[![PyPI](https://img.shields.io/pypi/v/polars-cli)](https://pypi.org/project/polars-cli/)
The Polars command line interface provides a convenient way to execute SQL commands using Polars as a backend.
## Installation
The recommended way to install the Polars CLI is by using [pip](https://pip.pypa.io/):
```bash
pip install polars-cli
```
This will install a pre-compiled binary and make it available on your path under `polars`.
If you do not have Python available, you can download a suitable binary from the most recent [GitHub release](https://github.com/pola-rs/polars-cli/releases/latest/).
Alternatively, you can install the Polars CLI using [cargo](https://doc.rust-lang.org/cargo/), which will compile the code from scratch:
```bash
cargo install --locked polars-cli
```
## Usage
Running `polars` without any arguments will start an interactive shell in which you can run SQL commands.
```shell
$ polars
Polars CLI version 0.4.0
Type .help for help.
>> select * FROM read_csv('examples/datasets/foods.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 │
└────────────┴──────────┴────────┴──────────┘
```
Alternatively, SQL commands can be piped directly into the Polars CLI.
```bash
$ echo "SELECT category FROM read_csv('examples/datasets/foods.csv')" | polars
┌────────────┐
│ category │
│ --- │
│ str │
╞════════════╡
│ vegetables │
│ seafood │
│ meat │
│ fruit │
│ … │
│ seafood │
│ seafood │
│ fruit │
│ meat │
└────────────┘
```
## Features
When compiling the Polars CLI from source, the following features can be enabled:
| 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 |
Raw data
{
"_id": null,
"home_page": null,
"name": "polars-cli",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "dataframe, arrow, out-of-core, sql",
"author": null,
"author_email": "Ritchie Vink <ritchie46@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/91/2e/7398eb771e740663ed79d800288264fa47896bc5aad4bc35c2f3a840a4af/polars_cli-0.8.0.tar.gz",
"platform": null,
"description": "# Polars CLI\n\n[![Crates.io](https://img.shields.io/crates/v/polars-cli)](https://crates.io/crates/polars-cli)\n[![PyPI](https://img.shields.io/pypi/v/polars-cli)](https://pypi.org/project/polars-cli/)\n\nThe Polars command line interface provides a convenient way to execute SQL commands using Polars as a backend.\n\n## Installation\n\nThe recommended way to install the Polars CLI is by using [pip](https://pip.pypa.io/):\n\n```bash\npip install polars-cli\n```\n\nThis will install a pre-compiled binary and make it available on your path under `polars`.\nIf you do not have Python available, you can download a suitable binary from the most recent [GitHub release](https://github.com/pola-rs/polars-cli/releases/latest/).\n\nAlternatively, you can install the Polars CLI using [cargo](https://doc.rust-lang.org/cargo/), which will compile the code from scratch:\n\n```bash\ncargo install --locked polars-cli\n```\n\n## Usage\n\nRunning `polars` without any arguments will start an interactive shell in which you can run SQL commands.\n\n```shell\n$ polars\nPolars CLI version 0.4.0\nType .help for help.\n\n>> select * FROM read_csv('examples/datasets/foods.csv');\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 category \u2506 calories \u2506 fats_g \u2506 sugars_g \u2502\n\u2502 --- \u2506 --- \u2506 --- \u2506 --- \u2502\n\u2502 str \u2506 i64 \u2506 f64 \u2506 i64 \u2502\n\u255e\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2561\n\u2502 vegetables \u2506 45 \u2506 0.5 \u2506 2 \u2502\n\u2502 seafood \u2506 150 \u2506 5.0 \u2506 0 \u2502\n\u2502 meat \u2506 100 \u2506 5.0 \u2506 0 \u2502\n\u2502 fruit \u2506 60 \u2506 0.0 \u2506 11 \u2502\n\u2502 \u2026 \u2506 \u2026 \u2506 \u2026 \u2506 \u2026 \u2502\n\u2502 seafood \u2506 200 \u2506 10.0 \u2506 0 \u2502\n\u2502 seafood \u2506 200 \u2506 7.0 \u2506 2 \u2502\n\u2502 fruit \u2506 60 \u2506 0.0 \u2506 11 \u2502\n\u2502 meat \u2506 110 \u2506 7.0 \u2506 0 \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\nAlternatively, SQL commands can be piped directly into the Polars CLI.\n\n```bash\n$ echo \"SELECT category FROM read_csv('examples/datasets/foods.csv')\" | polars\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 category \u2502\n\u2502 --- \u2502\n\u2502 str \u2502\n\u255e\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2561\n\u2502 vegetables \u2502\n\u2502 seafood \u2502\n\u2502 meat \u2502\n\u2502 fruit \u2502\n\u2502 \u2026 \u2502\n\u2502 seafood \u2502\n\u2502 seafood \u2502\n\u2502 fruit \u2502\n\u2502 meat \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## Features\n\nWhen compiling the Polars CLI from source, the following features can be enabled:\n\n| Feature | Description |\n| --------- | --------------------------------------------------------- |\n| default | The default feature set that includes all other features. |\n| highlight | Provides syntax highlighting |\n| parquet | Enables reading and writing of Apache Parquet files. |\n| json | Enables reading and writing of JSON files. |\n| ipc | Enables reading and writing of IPC/Apache Arrow files |\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "CLI interface for running SQL queries with Polars as backend",
"version": "0.8.0",
"project_urls": {
"Changelog": "https://github.com/pola-rs/polars-cli/releases",
"Documentation": "https://github.com/pola-rs/polars-cli",
"Homepage": "https://www.pola.rs/",
"Repository": "https://github.com/pola-rs/polars-cli"
},
"split_keywords": [
"dataframe",
" arrow",
" out-of-core",
" sql"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cc918c65a02ff6fdf8e9b5d83eb85a883ec8e6014e6a89923aeda435c19e1d1f",
"md5": "8525de3faacf33bc4a7e1f3bfe938f49",
"sha256": "a74c9a1068443e0b4c395e6cf86859b2c5ffbb52d8db49d49cf9f561bff43c88"
},
"downloads": -1,
"filename": "polars_cli-0.8.0-py3-none-macosx_10_12_x86_64.whl",
"has_sig": false,
"md5_digest": "8525de3faacf33bc4a7e1f3bfe938f49",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 10605347,
"upload_time": "2024-06-03T07:44:08",
"upload_time_iso_8601": "2024-06-03T07:44:08.880692Z",
"url": "https://files.pythonhosted.org/packages/cc/91/8c65a02ff6fdf8e9b5d83eb85a883ec8e6014e6a89923aeda435c19e1d1f/polars_cli-0.8.0-py3-none-macosx_10_12_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "754883b41815126909970871d04e0f53c36a3ff6c7f5c74505ed53927a803fdc",
"md5": "699496dbc0c8b7e73bff4811554149eb",
"sha256": "d2d8e2c303d2129a4ee5b6891ab10b8b0d43456a683ece877abca87694e7b3f0"
},
"downloads": -1,
"filename": "polars_cli-0.8.0-py3-none-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "699496dbc0c8b7e73bff4811554149eb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 9009640,
"upload_time": "2024-06-03T07:44:11",
"upload_time_iso_8601": "2024-06-03T07:44:11.751134Z",
"url": "https://files.pythonhosted.org/packages/75/48/83b41815126909970871d04e0f53c36a3ff6c7f5c74505ed53927a803fdc/polars_cli-0.8.0-py3-none-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3ae882b4201855b67b166e9333a73612cac97cbf2f70fdb514c279ee70585f7e",
"md5": "9b1bfc4ce9c49255493b15271ad3ac33",
"sha256": "ced29af5b5420335c660933e2fe773976e0ba64c7e01a02f16b73897bcbc179c"
},
"downloads": -1,
"filename": "polars_cli-0.8.0-py3-none-manylinux_2_28_aarch64.whl",
"has_sig": false,
"md5_digest": "9b1bfc4ce9c49255493b15271ad3ac33",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 10340440,
"upload_time": "2024-06-03T07:44:14",
"upload_time_iso_8601": "2024-06-03T07:44:14.368591Z",
"url": "https://files.pythonhosted.org/packages/3a/e8/82b4201855b67b166e9333a73612cac97cbf2f70fdb514c279ee70585f7e/polars_cli-0.8.0-py3-none-manylinux_2_28_aarch64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0a4eaf4895e87ab98fa0c38910de78f750c5ee20ecbf4106d70442f1ae8b585c",
"md5": "606550eabb7d51bf951de0b0c71d693a",
"sha256": "a727fb50f9c98340c324052f9ed6657459902917fddc52b49b74888fac2c1bcb"
},
"downloads": -1,
"filename": "polars_cli-0.8.0-py3-none-manylinux_2_28_x86_64.whl",
"has_sig": false,
"md5_digest": "606550eabb7d51bf951de0b0c71d693a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 11787964,
"upload_time": "2024-06-03T07:44:17",
"upload_time_iso_8601": "2024-06-03T07:44:17.120643Z",
"url": "https://files.pythonhosted.org/packages/0a/4e/af4895e87ab98fa0c38910de78f750c5ee20ecbf4106d70442f1ae8b585c/polars_cli-0.8.0-py3-none-manylinux_2_28_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5e2bfdcb580b3a73711c109f9c8a552c063466e836c555f2fcd6a4379d2595ee",
"md5": "f10d781ba92436f9bec0f7e7258f04f6",
"sha256": "05b75d65f202b0ba95f871a92093d2db9cc5440e3314ec41ea09b0dfa4982f34"
},
"downloads": -1,
"filename": "polars_cli-0.8.0-py3-none-win_amd64.whl",
"has_sig": false,
"md5_digest": "f10d781ba92436f9bec0f7e7258f04f6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 10495094,
"upload_time": "2024-06-03T07:44:19",
"upload_time_iso_8601": "2024-06-03T07:44:19.288792Z",
"url": "https://files.pythonhosted.org/packages/5e/2b/fdcb580b3a73711c109f9c8a552c063466e836c555f2fcd6a4379d2595ee/polars_cli-0.8.0-py3-none-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "912e7398eb771e740663ed79d800288264fa47896bc5aad4bc35c2f3a840a4af",
"md5": "ea9b2fc3b0b92eaebb37b5f4cfd18312",
"sha256": "217b9c7601b93c07147c93c50490311a254210af0867bdee766f92725377a901"
},
"downloads": -1,
"filename": "polars_cli-0.8.0.tar.gz",
"has_sig": false,
"md5_digest": "ea9b2fc3b0b92eaebb37b5f4cfd18312",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 35111,
"upload_time": "2024-06-03T07:44:21",
"upload_time_iso_8601": "2024-06-03T07:44:21.792831Z",
"url": "https://files.pythonhosted.org/packages/91/2e/7398eb771e740663ed79d800288264fa47896bc5aad4bc35c2f3a840a4af/polars_cli-0.8.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-03 07:44:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pola-rs",
"github_project": "polars-cli",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "polars-cli"
}