Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tableparse

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tableparse

A stand alone package for making string tables from 2D string arrays

  • 0.8
  • PyPI
  • Socket score

Maintainers
1

Tableparse


A stand alone library which parses an array and a set of headers into a text based table

Features

  • tableparse.tablify(2D array of strings) Takes a 2D array of strings and returns a string containing the table

e.g.

>>> array = [
>>> ["Title", "Description"],
>>> ["Macbeth", "A play by Shakespear"]
>>> ]

>>> print(tableparse.tablify(array))
╔═══════╦═════════════════════╗
║Title  ║Description          ║
╠═══════╬═════════════════════╣
║Macbeth║A play by Shakespeare║
╚═══════╩═════════════════════╝

Usage

import tableparse

array = [
    ["Name", "Description", "URL"],
    ["TableParse", "A stand alone table generators", "https://github.com/TommyGymer/Tableparse"],
    ["JSChess", "A stand alone JS chess implementation", "https://github.com/TommyGymer/JS-Chess"],
    ["Dijkstra Pathfinding", "An implementation of Dijkstra's pathfinding algorithm", "https://github.com/TommyGymer/Dijkstra-pathfinding"]
]

result = tableparse.tablify(array)

tablify

Turns a 2D array into a table string

Tablify

tablify_str

length = 2000
result = tableparse.tablify_str(array, length)

Returns a list of strings containing a table split in the 'length' characters

Tablify_str

inv_array

inv_array = tableparse.inv_array(array)

result = tableparse.tablify(inv_array)

Flips an array's columns and rows

array inverse

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc