Skip to main content

Command Line Tools for Apache Feather Files

Stand-alone Unix shell command line tools for Apache's .feather formatted files:

- fless
- ftail
- fwc (-l)
- f2csv

Each tool operates in the spirit of the analogous Unix shell command. Only the most basic uses of these original Unix tools are suported in their f version. For example, the fwc command operates like wc -l, i.e. it displays the number of data rows. But wc -c is not provided.

Installation

The recommended installation is via pipx, which is designed to install shell level command line tools. It will create a $HOME/.local/bin directory if it does not exist. The commands fless, ftail, etc. will reside there. The pipx installation offers to add the location to the OS PATH by adding an entry in the shell config file.

- pip install pipx
- pipx install feather-tools

Usage

fless

fless <fpath>

Shows one screenful of the .feather file at a time. The number of rows displayed is determined by the terminal in which the command is issued. At the end of each displayed page, type a single character:

  • To show the next page: spacebar, or \n, or the character n
  • Back one page: b
  • Back to beginning (page 0): s
  • To the last page: e
  • For help: h
  • To quit the display: q

ftail <fpath> [(-n | --lines) n]

Displays the last n rows of the .feather file. Default is the lesser of 10, and the length of the data.

NOTE: Starts the row display with the logical (i.e. terminal-height) page that contains the first line specified by the tail default or in the --lines argument. So a few more rows than requested may be displayed at the top.

fwc <fpath>

Is analogout to the Unix wc -l, and shows the number of data rows, not counting the column header.

f2csv <src-fpath> [<dst-fpath>]

Writes a .csv file that contains the .feather data. Default separator is comma. Default output is stdout.

The command line arguments are as in the Pandas df.to_csv() documentation. This means that the index keyword is True by default, while index_label is None. Which leads to ugly .csv like:

,foo,bar,fum
Row0,1,2,3
Row1,4,5,6
Row2,7,8,9

Where the Rown are the dataframe index. Note the orphan comma in the header. To fix (same as with df.to_csv()):

f2csv --index=true --index_label=Rows file.feather

Rows,foo,bar,fum
Row0,1,2,3
Row1,4,5,6
Row2,7,8,9

or:

f2csv --index=false file.feather

foo,bar,fum
1,2,3
4,5,6
7,8,9

If you clone this repo to make changes: all Python imports are relative to <proj-root>/src. So ensure that your $PYTHONPATH includes that directory.

Testing

To test the code, clone this repo, and install the test dependency:

pip install .[test]
pytest

Metadata

Release files for feather-tools 1.1.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 feather-tools 1.1.0
File Size Uploaded Provenance
feather_tools-1.1.0.tar.gz 24.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for feather-tools 1.1.0
File Interpreter ABI Platform
feather_tools-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 55.0 kB

Release files / feather_tools-1.1.0.tar.gz

Download URL feather_tools-1.1.0.tar.gz
Size 24.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a92c866216637db50852ded3ee58fe319121a1ad8b6f1a2ee4b8aa41c03994cb
BLAKE2b-256 checksum
How to use checksums
050f64c9aea004186966a4b283aa446b9b11954af747faf6933d4fcf949989ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / feather_tools-1.1.0-py3-none-any.whl

Download URL feather_tools-1.1.0-py3-none-any.whl
Size 31.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d624e86a802184e0ac3d2990dc5dea52e5eaf7932e49994b1b71e4fbc7a725af
BLAKE2b-256 checksum
How to use checksums
0e3742ebbed77116709ce9b7ae307709ce3d353eb96aa75c77548f13ac145817
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for feather-tools 1.1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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