Giter VIP home page Giter VIP logo

terminaltables's Introduction

terminaltables

Easily draw tables in terminal/console applications from a list of lists of strings. Supports multi-line rows.

  • Python 2.6, 2.7, PyPy, PyPy3, 3.3, 3.4, and 3.5 supported on Linux and OS X.
  • Python 2.7, 3.3, 3.4, and 3.5 supported on Windows (both 32 and 64 bit versions of Python).

๐Ÿ“– Full documentation: https://robpol86.github.io/terminaltables

Build Status Windows Build Status Coverage Status Latest Version

Quickstart

Install:

pip install terminaltables

Usage:

from terminaltables import AsciiTable
table_data = [
    ['Heading1', 'Heading2'],
    ['row1 column1', 'row1 column2'],
    ['row2 column1', 'row2 column2'],
    ['row3 column1', 'row3 column2']
]
table = AsciiTable(table_data)
print table.table
+--------------+--------------+
| Heading1     | Heading2     |
+--------------+--------------+
| row1 column1 | row1 column2 |
| row2 column1 | row2 column2 |
| row3 column1 | row3 column2 |
+--------------+--------------+

Example Implementations

Example Scripts Screenshot

Source code for examples: example1.py, example2.py, and example3.py

Changelog

This project adheres to Semantic Versioning.

3.1.0 - 2016-10-16

Added

3.0.0 - 2016-05-30

Added
Changed
  • Refactored again, but this time entire project including tests.
Removed
  • padded_table_data property and join_row(). Moving away from repeated string joining/splitting.
Fixed

2.1.0 - 2015-11-02

Added
  • GitHub Flavored Markdown table by bcho: Robpol86#12
  • Python 3.5 support (Linux/OS X and Windows).

2.0.0 - 2015-10-11

Changed
  • Refactored code. No new features.
  • Breaking changes: UnixTable/WindowsTable/WindowsTableDouble moved. Use SingleTable/DoubleTable instead.

1.2.1 - 2015-09-03

Fixed
  • CJK character width fixed by zqqf16 and bcho: Robpol86#9

1.2.0 - 2015-05-31

Added
  • Bottom row separator.

1.1.1 - 2014-11-03

Fixed
  • Python 2.7 64-bit terminal width bug on Windows.

1.1.0 - 2014-11-02

Added
  • Windows support.
  • Double-lined table.

1.0.2 - 2014-09-18

Added
  • table_width and ok properties.

1.0.1 - 2014-09-12

Added
  • Terminal width/height defaults for testing.
  • terminaltables.DEFAULT_TERMINAL_WIDTH
  • terminaltables.DEFAULT_TERMINAL_HEIGHT

1.0.0 - 2014-09-11

  • Initial release.

terminaltables's People

Contributors

aleivag avatar bcho avatar kovacsbalu avatar liiight avatar msabramo avatar robpol86 avatar zqqf16 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.