Skip to main content

Nicely format Aera interface-output to a table in ASCII or CSV format.

TLDR

If you query a lot from an interface in Aera, you might want to format the output in a more readable way. This script does that for you. It takes the output from an interface and formats it into a table in ASCII or CSV format.

Installation

Ideally install using pipx, like any other command line tool:

    pipx install aeratable

Alternatively, you can install using pip:

    pip install aeratable

Example

If you copy the output from an interface in Aera like below:

Alt text

It has the tendency to be in a very unusefull format. See the example of what the paste looks like:

Alt text

The aeratable command line tool can be used to format this output into an ASCII (or CSV) table. The command line tool takes the 'ugly' formatted output directly from Windows' clipboard (using the wonderfull pyperclip package) and creates a table in ASCII format. by default this will replace the clipboard content with the formatted table. If you provide the -v or --verbose flag, the table will additionally be printed to the console.

    aeratable -v

The output (when pasted back into the interface) will now look like this:

Alt text

This can be very usefull if you query a lot from an interface in Aera, and want to store your intermediate results in a more readable format directly in the interface. Don't forget to put the table in a comment block (/* ... */) to prevent the interface from interpreting the table as a query.

I want CSV instead of ASCII

simple! use the -f or --fmt flag with the value csv:

    aeratable  -f csv

Interactive mode

The -i or --interactive flag can be used to enter the interactive mode. In this mode, you can union multiple tables together. This is usefull if you have a SQL script that outputs more than 250 rows (which is the Aera interface limit). The interactive mode will prompt you with the question to copy the next interface-output to your clipboard. The script will then append the new table to the previous one when you enter y. This can be repeated as many times as you like. The final table will be copied to the clipboard when you provide f (for finished).

    aeratable -i
    # the above command will prompt you with the following question:
    # Can we take the next interface output from your clipboard? [y/n/f]:

The nice part about the interactive mode is that it will check the headers of the tables to make sure they are the same. This prevents you from making mistakes when unioning tables together.

Happy SQL!

Metadata

Release files for aeratable 0.2.1

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

Built distribution (wheel)

Table of built distributions (wheels) for aeratable 0.2.1
File Interpreter ABI Platform
aeratable-0.2.1-py3-none-any.whl Python 3 none any Details

Release files / aeratable-0.2.1-py3-none-any.whl

Download URL aeratable-0.2.1-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8bd8391717b0fa3d7ecb5c2392f1a28b9ed6a9a2f13110c581604b50d8bcee8e
BLAKE2b-256 checksum
How to use checksums
aee48e76d006865f91356583bce16f68a9bdd0d70e5fa5ba59112d6e43c592eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Security for aeratable 0.2.1

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