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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: aligned_text_table-0.1.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.1.0.tar.gz
Algorithm Hash digest
SHA256 6d73cbc32ffbe4ecb9a008db674a961787f60c2610040e35af41ea0e23d38fce
MD5 5940a2bf34a7b511f891ff08ebc4d689
BLAKE2b-256 fd81ed730081c4f549aa5d53ee2bfc6d5217ebfaa9cc4c81ef58f6f2e262cd91

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aligned_text_table-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 af3068dd16046a4f6a214e5ddbf23f3810a95f508e5ed3b8a9fa722e5c8128e2
MD5 1236a944f2eb8ff75ab112a5a45adf20
BLAKE2b-256 d4f3151d5741602821a0db93aba8b9ac6ae5fa191eaf169bbddee51b2f0c7e27

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