Metadata-Version: 2.4
Name: sas7bdat-cli
Version: 0.9.7
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Rust
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Utilities
License-File: LICENSE
License-File: LICENSE-ReadStat
Summary: Fast command-line converter and inspector for SAS7BDAT files
Keywords: sas,sas7bdat,parquet,csv,cli,convert
License-Expression: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/tkragholm/sas7bdat-parser-rs
Project-URL: Issues, https://github.com/tkragholm/sas7bdat-parser-rs/issues
Project-URL: Repository, https://github.com/tkragholm/sas7bdat-parser-rs

# sas7bdat-cli

A command-line tool for inspecting SAS7BDAT files, the binary format written by
SAS, and converting them to Parquet, CSV or TSV. It is a single Rust binary built on
the [`sas7bdat`](https://crates.io/crates/sas7bdat) reader, and needs no SAS
installation or C library.

## Installation

```sh
pip install sas7bdat-cli
# or, as an isolated tool:
uv tool install sas7bdat-cli
```

Wheels are built for Linux (x86-64 and ARM64), Windows (x86-64) and macOS (Apple
Silicon). On x86-64 the binary needs a CPU with AVX2: Intel Haswell (2013) or AMD
Excavator (2015) and later.

The wheel ships a single executable, `sas7bdat`. It is a plain binary wheel
(`py3-none-<platform>`), so it works with any Python version and has no
dependencies; pip is only the way it is delivered.

Rust users can install the same tool from source instead:

```sh
cargo install --git https://github.com/tkragholm/sas7bdat-parser-rs sas7bdat-cli
```

## Usage

```sh
sas7bdat info data.sas7bdat        # columns, types, labels, and a sample
sas7bdat head data.sas7bdat        # first rows as a table
sas7bdat convert data.sas7bdat     # -> data.parquet (Zstd)
sas7bdat convert data.sas7bdat --out out.csv        # format inferred from the extension
sas7bdat convert ./folder --out-dir out             # whole tree, mirrored
sas7bdat completions zsh           # shell completion script
```

Run `sas7bdat <command> --help` for the full options of a command.

## Related packages

- [`sas7bdat-polars`](https://pypi.org/project/sas7bdat-polars/): a Polars plugin
  built on the same reader, with lazy scans and projection pushdown.
  `pip install "sas7bdat-polars[cli]"` installs it together with this CLI.
- [`sas7bdat`](https://crates.io/crates/sas7bdat): the Rust crate.

## License

MIT. See the [repository](https://github.com/tkragholm/sas7bdat-parser-rs) for
third-party notices and the SAS trademark note.

