Skip to main content
pyRestTable
===========

:version: 2014-02

:author: Pete R. Jemian

:email: prjemian@gmail.com

:copyright: (c) 2014, Pete R. Jemian

:URL: https://github.com/prjemian/pyRestTable

:download: https://github.com/prjemian/pyRestTable/tarball/2014-02

Distributed under the terms of the Creative Commons
Attribution 4.0 International Public License.
The full license is in the file *LICENSE.txt*, distributed with this software.


Format a nice table in reST (reStructuredText ) from Python

Each cell may have multiple lines, separated by "\n".
The content of each cell will be rendered as str(cell).


Interactive example with ipython
--------------------------------

In [1]: import pyRestTable

In [2]: pyRestTable.__long_description__

Out[2]: 'Format a nice table in reST (reStructuredText ) from Python'

In [3]: pyRestTable.__version__

Out[3]: '2014-02'

In [4]: t = pyRestTable.Table()

In [5]: t.labels = ['x', 'y']

In [6]: t.rows.append([1,2])

In [7]: print t.reST()

= =
x y
= =
1 2
= =


Complex table example
---------------------

These commands::

import pyRestTable
t = pyRestTable.Table()
t.labels = ('Name\nand\nAttributes', 'Type', 'Units', 'Description\n(and Occurrences)', )
t.rows.append( ['one,\ntwo', "buckle my", "shoe.\n\n\nthree,\nfour", "..."] )
t.rows.append( ['class', 'NX_FLOAT', '..', '..', ] )
t.rows.append( range(0,4) )
t.rows.append( [None, t, 1.234, range(3)] )
print t.reST(fmt='complex')

build this table source code::

+------------+-----------------------------------------+--------+-------------------+
| Name | Type | Units | Description |
| and | | | (and Occurrences) |
| Attributes | | | |
+============+=========================================+========+===================+
| one, | buckle my | shoe. | ... |
| two | | | |
| | | | |
| | | three, | |
| | | four | |
+------------+-----------------------------------------+--------+-------------------+
| class | NX_FLOAT | .. | .. |
+------------+-----------------------------------------+--------+-------------------+
| 0 | 1 | 2 | 3 |
+------------+-----------------------------------------+--------+-------------------+
| None | <__main__.Table instance at 0x022B8EE0> | 1.234 | [0, 1, 2] |
+------------+-----------------------------------------+--------+-------------------+

Metadata

Release files for pyRestTable 2014-02

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

Source distribution (sdist)

Source distribution for pyRestTable 2014-02
File Size Uploaded Provenance
pyRestTable-2014-02.tar.gz 7.6 kB Without provenance Details

Release files / pyRestTable-2014-02.tar.gz

Download URL pyRestTable-2014-02.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9361ae9a6e23bf96ec177717a8271b1745b75641bf7e2eab17c95bdba306f828
BLAKE2b-256 checksum
How to use checksums
6a1fdf6e1fc8cf3b3e84875b2de54b3e70c1cc088f0d3d968ae8e078f293fffb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pyRestTable 2014-02

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.

Release history Release notifications | RSS feed

This release

2014-02 This release

1 release file No provenance

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