Skip to main content

PyPI version fury.io Anaconda version pyversions Build Status Maintenance GitHub license PyPI - Downloads Codacy Badge

ANSITable logo

ANSITable

Pretty tables and matrices for Python

Quick example

from ansitable import ANSITable

table = ANSITable("Name", "Score", border="thin")
table.row("Alice", 95)
table.row("Bob", 87)
table.row("Carol", 92)
table.print()

Output:

┌───────┬───────┐
│ Name  │ Score │
├───────┼───────┤
│ Alice │    95 │
│   Bob │    87 │
│ Carol │    92 │
└───────┴───────┘

Features

  • Unicode and ANSI colors — Beautiful output in any ANSI-capable terminal
  • 7 export formats — Markdown, HTML, LaTeX, reStructuredText, Wikitable, CSV, Pandas
  • Rich styling — Colors, backgrounds, text styles (bold, underlined, etc.), alignment, width control
  • Sorting — Sort tables by any column, with optional key function
  • Pandas integration — Convert DataFrames to/from ANSITable
  • Matrix formatting — Pretty-print NumPy arrays with brackets and styles
  • Flexible API — Simple string-based or detailed Column-based column specification

Installation

pip install ansitable

Optional dependency for colors:

pip install colored

Documentation

See the comprehensive documentation for tutorials, examples, and API reference.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ansitable-1.0.1.tar.gz (86.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ansitable-1.0.1-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file ansitable-1.0.1.tar.gz.

File metadata

  • Download URL: ansitable-1.0.1.tar.gz
  • Upload date:
  • Size: 86.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for ansitable-1.0.1.tar.gz
Algorithm Hash digest
SHA256 b6cd0e2ccba1c6402466d9e6a55fb939fec15239803b627c8ab54cf2edb70cc9
MD5 1e1be4daad4ee6c986677b6bc931dc0c
BLAKE2b-256 8d4ea6eec8f6f60cb65b365b5941c2c4a19f32f76e21e352cbda8218399752dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansitable-1.0.1.tar.gz:

Publisher: release.yml on petercorke/ansitable

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ansitable-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: ansitable-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for ansitable-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fad3a4964c2382e65288b2e0dd891ade71eb0a64eacf80a97447cae0a21de1de
MD5 3ba7fe44a5e84c2f2777e4338e4a5a43
BLAKE2b-256 5a7ba6179cfc4a8e09afa15124e7831463c28a7b0d370e014d89f7727d912b8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansitable-1.0.1-py3-none-any.whl:

Publisher: release.yml on petercorke/ansitable

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

1.0.0

2 files

0.11.7

2 files

0.11.5

2 files

0.11.4

2 files

0.11.3

2 files

0.11.2

2 files

0.11.1

2 files

0.11.0

2 files

0.10.0

2 files

0.9.10

2 files

0.9.9

2 files

0.9.7

2 files

0.9.6

1 file

0.9.5

1 file

0.9.4

1 file

0.9.3

1 file

0.9.2

1 file

0.9.1

1 file

0.9

1 file

0.8.2

1 file

0.8.1

1 file

0.8

1 file

0.5

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page