Printable
Functions help for printing tabular data.
Install
pip3 install printable
Usage Example
from printable import readable
print(readable(list_of_dict, grid='full'))
$ python -m printable -t csv -f samples/sample.csv
symbol desp last change changeper turnover changesign lastupdate
HSI 恆指 26623 -468 1.73% 802億 - 2018/10/04 16:09
HSCEI 國指 10547 -239 2.21% 257億 - 2018/10/04 16:08
000001.SH 上證指數 2821 29 1.06% 1254億 + 2018/09/28 15:10
000300.SH 滬深 300 3438 35 1.04% 949億 + 2018/09/28 15:10
USDHKD 港匯 7.8337 -0.0037 -0.0472% -
$ python -m printable -t csv -f samples/sample.csv --grid inner
symbol │ desp │ last │ change │ changeper │ turnover │ changesign │ lastupdate
───────────┼──────────┼────────┼─────────┼───────────┼──────────┼────────────┼──────────────────
HSI │ 恆指 │ 26623 │ -468 │ 1.73% │ 802億 │ - │ 2018/10/04 16:09
───────────┼──────────┼────────┼─────────┼───────────┼──────────┼────────────┼──────────────────
HSCEI │ 國指 │ 10547 │ -239 │ 2.21% │ 257億 │ - │ 2018/10/04 16:08
───────────┼──────────┼────────┼─────────┼───────────┼──────────┼────────────┼──────────────────
000001.SH │ 上證指數 │ 2821 │ 29 │ 1.06% │ 1254億 │ + │ 2018/09/28 15:10
───────────┼──────────┼────────┼─────────┼───────────┼──────────┼────────────┼──────────────────
000300.SH │ 滬深 300 │ 3438 │ 35 │ 1.04% │ 949億 │ + │ 2018/09/28 15:10
───────────┼──────────┼────────┼─────────┼───────────┼──────────┼────────────┼──────────────────
USDHKD │ 港匯 │ 7.8337 │ -0.0037 │ -0.0472% │ │ - │
$ python -m printable -t csv -f samples/sample.csv --grid full
┌───────────┬──────────┬────────┬─────────┬───────────┬──────────┬────────────┬──────────────────┐
│ symbol │ desp │ last │ change │ changeper │ turnover │ changesign │ lastupdate │
├───────────┼──────────┼────────┼─────────┼───────────┼──────────┼────────────┼──────────────────┤
│ HSI │ 恆指 │ 26623 │ -468 │ 1.73% │ 802億 │ - │ 2018/10/04 16:09 │
├───────────┼──────────┼────────┼─────────┼───────────┼──────────┼────────────┼──────────────────┤
│ HSCEI │ 國指 │ 10547 │ -239 │ 2.21% │ 257億 │ - │ 2018/10/04 16:08 │
├───────────┼──────────┼────────┼─────────┼───────────┼──────────┼────────────┼──────────────────┤
│ 000001.SH │ 上證指數 │ 2821 │ 29 │ 1.06% │ 1254億 │ + │ 2018/09/28 15:10 │
├───────────┼──────────┼────────┼─────────┼───────────┼──────────┼────────────┼──────────────────┤
│ 000300.SH │ 滬深 300 │ 3438 │ 35 │ 1.04% │ 949億 │ + │ 2018/09/28 15:10 │
├───────────┼──────────┼────────┼─────────┼───────────┼──────────┼────────────┼──────────────────┤
│ USDHKD │ 港匯 │ 7.8337 │ -0.0037 │ -0.0472% │ │ - │ │
└───────────┴──────────┴────────┴─────────┴───────────┴──────────┴────────────┴──────────────────┘
$ python -m printable -t csv -f samples/sample.csv --grid markdown
| symbol | desp | last | change | changeper | turnover | changesign | lastupdate |
|-----------|----------|--------|---------|-----------|----------|------------|------------------|
| HSI | 恆指 | 26623 | -468 | 1.73% | 802億 | - | 2018/10/04 16:09 |
| HSCEI | 國指 | 10547 | -239 | 2.21% | 257億 | - | 2018/10/04 16:08 |
| 000001.SH | 上證指數 | 2821 | 29 | 1.06% | 1254億 | + | 2018/09/28 15:10 |
| 000300.SH | 滬深 300 | 3438 | 35 | 1.04% | 949億 | + | 2018/09/28 15:10 |
| USDHKD | 港匯 | 7.8337 | -0.0037 | -0.0472% | | - | |
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
printable-0.4.0.tar.gz
(415.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
printable-0.4.0-py3-none-any.whl
(416.8 kB
view details)
File details
Details for the file printable-0.4.0.tar.gz.
File metadata
- Download URL: printable-0.4.0.tar.gz
- Upload date:
- Size: 415.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a61040cadd7278c8e2015aed00b8cf9d349a2fa9cdc1293ead19e3a5b228ac3
|
|
| MD5 |
170a1aca12ae0db7ec25dd17f7f602d9
|
|
| BLAKE2b-256 |
e6423b6b492e46059a274c2a66c0e9e3d82d2a9932347e4141022f19310e83cc
|
File details
Details for the file printable-0.4.0-py3-none-any.whl.
File metadata
- Download URL: printable-0.4.0-py3-none-any.whl
- Upload date:
- Size: 416.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8698325ed681d9594d8c363871d72073a45e176ffcad8f6be732679a96497126
|
|
| MD5 |
fb5c101439c259aadd2a83c337c5e69a
|
|
| BLAKE2b-256 |
b20026f9ef3161b551fa3a0e91f75613002455a58c97b4f3724ff1e2df50fbcf
|