Skip to main content

Polars CLI

Crates.io PyPI

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:

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.

Alternatively, you can install the Polars CLI using cargo, which will compile the code from scratch:

cargo install --locked polars-cli

Usage

Running polars without any arguments will start an interactive shell in which you can run SQL commands.

$ 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.

$ 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

Metadata

Release files for polars-cli 0.9.0

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

Source distribution (sdist)

Source distribution for polars-cli 0.9.0
File Size Uploaded Provenance Actions
polars_cli-0.9.0.tar.gz 35.2 kB With provenance Details for polars_cli-0.9.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for polars-cli 0.9.0
File Actions
polars_cli-0.9.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for polars_cli-0.9.0-py3-none-win_amd64.whl
polars_cli-0.9.0-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for polars_cli-0.9.0-py3-none-manylinux_2_28_x86_64.whl
polars_cli-0.9.0-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for polars_cli-0.9.0-py3-none-manylinux_2_28_aarch64.whl
polars_cli-0.9.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for polars_cli-0.9.0-py3-none-macosx_11_0_arm64.whl
polars_cli-0.9.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for polars_cli-0.9.0-py3-none-macosx_10_12_x86_64.whl

Total release size: 68.2 MB

Release files / polars_cli-0.9.0.tar.gz

Download URL polars_cli-0.9.0.tar.gz
Size 35.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9d8ddaebd87e4280839eb3755217d7e7dcdef70873f152ac8d7e09dca71cde99
BLAKE2b-256 checksum
How to use checksums
8b86572d41c5f5591f1ce27a8da6689764f9de5c5cd993dd0c22be88002746d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 12, 2025.

Transparency log

Release files / polars_cli-0.9.0-py3-none-win_amd64.whl

Download URL polars_cli-0.9.0-py3-none-win_amd64.whl
Size 12.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
72c45441a15a435c239227b7db2df02490ea7f4f8e49ae79f62fe0ec8e2581cf
BLAKE2b-256 checksum
How to use checksums
caceea444f8d738e0779312ca179f808583f342d853c9a0aaab726ae8543720b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 12, 2025.

Transparency log

Release files / polars_cli-0.9.0-py3-none-manylinux_2_28_x86_64.whl

Download URL polars_cli-0.9.0-py3-none-manylinux_2_28_x86_64.whl
Size 14.4 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
8a31fb708594b54faf16753fffb1252bcfea0c783ec47c6a58c71d1bdab04294
BLAKE2b-256 checksum
How to use checksums
413dde27ba695a5ed6c28733da09ce626154f8d01de96f2dba77a6a05c76300c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 12, 2025.

Transparency log

Release files / polars_cli-0.9.0-py3-none-manylinux_2_28_aarch64.whl

Download URL polars_cli-0.9.0-py3-none-manylinux_2_28_aarch64.whl
Size 12.8 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
24886d842cc2681f0a4e55c3c8cfac857fc51aa880ba1dd00e6ed0d7811ebfd5
BLAKE2b-256 checksum
How to use checksums
a13ffa898ed6f57aa86a134ac6ebd1f2cbc0919d95d930f8e55cea4f11053c87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 12, 2025.

Transparency log

Release files / polars_cli-0.9.0-py3-none-macosx_11_0_arm64.whl

Download URL polars_cli-0.9.0-py3-none-macosx_11_0_arm64.whl
Size 13.1 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
844f2983e9720cd282cee2265cf9a484e54d61dcd049a5bab50bcba6079b127f
BLAKE2b-256 checksum
How to use checksums
aa065302e10ecfeb397d51afe0fa0906454aaf92cc9a2270a23d1f43538ca1d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 12, 2025.

Transparency log

Release files / polars_cli-0.9.0-py3-none-macosx_10_12_x86_64.whl

Download URL polars_cli-0.9.0-py3-none-macosx_10_12_x86_64.whl
Size 15.0 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
e34d5b646b0fc11a95b227cb94e626268ec7f6f2bed6f5f3d1c8fc3193ab6f84
BLAKE2b-256 checksum
How to use checksums
c5f0ef901dd46730fdbf37adf2a2f2a2ef6735b453ffcad729a90ba0cb9a0b66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 12, 2025.

Transparency log

Security for polars-cli 0.9.0

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.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for polars_cli-0.9.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 12, 2025.

Transparency log

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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