Skip to main content

Parser for space-aligned tables in plain text

Project description

Aligned text table

A parser for tables in plain text that are aligned with spaces, e.g.:

This is     Column two   This one
column one               is column
                         three

Usage

>>> from aligned_text_table import parse_row

>>> parse_row(
...     lines=[
...         "This is     Column two   This one ",
...         "column one               is column",
...         "three    "
...     ],
...     keys=["one", "two", "three"]
... )

{
    "one": "This is column one",
    "two": "Column two",
    "three": "This one is column three"
}

Tests

To run tests, install and run Tox:

pip3 install tox
tox

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aligned_text_table-0.2.0.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

aligned_text_table-0.2.0-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file aligned_text_table-0.2.0.tar.gz.

File metadata

  • Download URL: aligned_text_table-0.2.0.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.2 Linux/6.2.0-20-generic

File hashes

Hashes for aligned_text_table-0.2.0.tar.gz
Algorithm Hash digest
SHA256 68d89334b304945917ca9428d612489eca071b00cbfd497f4ed0367f2cb54f77
MD5 3976c9f731ee1e7bfe2f98d955090e76
BLAKE2b-256 376939df8503af705d8a8c423bf0a94596b16cb96e92ba231be3cfe04c91be9a

See more details on using hashes here.

File details

Details for the file aligned_text_table-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aligned_text_table-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 606ed64292288594e749e54e34b6b1237b20a949f03ecf8b294c242069e0cadc
MD5 c20a5e479de41d1d671b1a5a20468bcb
BLAKE2b-256 02bd9d8c45305392a0f19ba639293fdc8103a3066d46207c9c582167197064bf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page