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.1.1.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

aligned_text_table-0.1.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aligned_text_table-0.1.1.tar.gz
  • Upload date:
  • Size: 2.3 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.1.1.tar.gz
Algorithm Hash digest
SHA256 981cbb1f49b3d033a48d2b5d96dccf09e8f4709be27508fb8c47335890dca561
MD5 e004c6282ef5f9afb6df97879b1d03f8
BLAKE2b-256 23a3c3d0776f5f3d3eb74cebf26f073edca349ab42387010074a989d3d35a125

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aligned_text_table-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3672576ee94b57c71e9264c00679d38291d32359166b3866397757fd1db033b6
MD5 28733b8554b2c1f711f1b1454b28afdf
BLAKE2b-256 ee3aa6053714de20106cccb8229d5fff10002316b8d10e7beb1b83d88698686d

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