Drawtable is a python library for drawing ASCII table with text data.
It also contains a command line tool called `csvless`
that helps you view csv files without hassle.
## Installation
```
pip install drawtable
```
## Usage
### CLI tool
For details please see `csvless -h`, here are some typical examples:
```
$ csvless samples/foo.csv
$ csvless -s markdown samples/foo.csv
$ csvless -s markdown --cat samples/foo.csv
$ csvless -s box -N samples/foo.csv
$ csvless -s box -N -n samples/foo.csv
$ csvless -H samples/foo.csv
$ csvless -w 10 --no-wrap samples/foo.csv
```
### Library
Draw table box for list data:
```python
>>> from drawbox import Table
>>> tb = Table(
... margin_x=1,
... margin_y=0,
... align='left',
... col_max_width=40,
... )
>>> tb.draw([
... ['project', 'url'],
... ['drawbox', 'https://github.com/reorx/drawbox'],
>>> ])
┌─────────┬──────────────────────────────────┐
│ project │ url │
├─────────┼──────────────────────────────────┤
│ drawbox │ https://github.com/reorx/drawbox │
└─────────┴──────────────────────────────────┘
```
Draw a simple one cell box:
```python
>>> from drawbox import Table
>>> tb = Table(
... margin_x=1,
... margin_y=0,
... align='center',
... col_max_width=40,
... )
>>> tb.draw([[
... """Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."""
... ]])
┌──────────────────────────────────────────┐
│ Lorem ipsum dolor sit amet, consectetur │
│ adipiscing elit, sed do eiusmod tempor i │
│ ncididunt ut labore et dolore magna aliq │
│ ua. Ut enim ad minim veniam, quis nostru │
│ d exercitation ullamco laboris nisi ut a │
│ liquip ex ea commodo consequat. │
└──────────────────────────────────────────┘
```
Metadata
Release files for drawtable 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| drawtable-0.2.0.tar.gz | 9.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| drawtable-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.3 kB
Release files / drawtable-0.2.0.tar.gz
| Download URL | drawtable-0.2.0.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d58f98f02f06dfe1efe101a57eead4c8eae8ac042f9117b1e1b93c2ed195db92
|
|
BLAKE2b-256 checksum How to use checksums |
927c0510a08d9e5c6a17335d6eac8c2df6a94da499e483118aa7ab51455fd647
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / drawtable-0.2.0-py3-none-any.whl
| Download URL | drawtable-0.2.0-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28a11f996db2a3691c0ce5db8bff59f4c038e9457e31d522cd2e91bff850952f
|
|
BLAKE2b-256 checksum How to use checksums |
98c0615862422f7621e9110663a96c15532e4a95c2b606d4e71d3f1be9d959a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for drawtable 0.2.0
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.