Skip to main content

Flat file format for multi-tabular data storage using ASCII separator characters.

Project description

ASCII Separated Data

Flat file format for multi-tabular data storage using ASCII separator characters

Flat/Text file (e.g. comma-separated, tab-separated, fixed-width, etc.) is by far the most common file format used for tabular data by data analysts in any industry. Flat files store structured data using specific column/row separator like comma, newline and data qualifier characters like double quotation.
There are few major issues present in the existing flat file formats: The separator and qualifier characters are commonly present in the data itself which makes it difficult to parse the file. Also, multiple tables are not supported by most of the existing file formats.
.asd flat file format/structure eliminates above listed and other issues in existing flat file formats. The presented file format uses existing ASCII separator characters (which are almost obsolete considering present day usage and may not appear in actual data) instead of common characters like comma, tab, pipe, etc.
This improves the quality and efficiency of data processing and allows multi-tabular data in a single flat file. I have named it ASCII Separated Data (ASD) with .asd as file extension.

Characters used

DEC OCT HEX BIN Symbol Description
1 1 01 00000001 SOH Start of Heading
2 2 02 00000010 STX Start of Text
3 3 03 00000011 ETX End of Text
28 34 1C 00011100 FS File Separator
29 35 1D 00011101 GS Group Separator
30 36 1E 00011110 RS Record Separator
31 37 1F 00011111 US Unit Separator

Basic Structure of .asd file

[FILE GROUP LEVEL METADATA (only one in a single .asd file)]

[FILE LEVEL METADATA] [DATASET/TABLE LEVEL METADATA] [DATA TABLE SEPARATED BY (US) AND (RS)] [GROUP SEPARATOR CHARACTER (GS)] [DATASET/TABLE LEVEL METADATA] [DATA TABLE SEPARATED BY (US) AND (RS)]

[FILE SEPARATOR CHARACTER (FS)]

[FILE LEVEL METADATA] [DATASET/TABLE LEVEL METADATA] [DATA TABLE SEPARATED BY (US) AND (RS)] [GROUP SEPARATOR CHARACTER (GS)] [DATASET/TABLE LEVEL METADATA [DATA TABLE SEPARATED BY (US) AND (RS)] [GROUP SEPARATOR CHARACTER (GS)] [DATASET/TABLE LEVEL METADATA] [DATA TABLE SEPARATED BY (US) AND (RS)]

[FILE SEPARATOR CHARACTER (FS)]

[FILE LEVEL METADATA] [DATASET/TABLE LEVEL METADATA] [DATA TABLE SEPARATED BY (US) AND (RS)] [GROUP SEPARATOR CHARACTER (GS)] [DATASET/TABLE LEVEL METADATA] [DATA TABLE SEPARATED BY (US) AND (RS)]

  • Note: newline characters are used for readability and will not appear in default .asd format

Installation

pip install asdfile

Usage

import asdfile as asd

Functions

  • read_asd()
  • write_asd()

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

asdfile-0.0.2.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

asdfile-0.0.2-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file asdfile-0.0.2.tar.gz.

File metadata

  • Download URL: asdfile-0.0.2.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for asdfile-0.0.2.tar.gz
Algorithm Hash digest
SHA256 1ead24a86c836466fd7034aa087beaaeaba723b3a2bc7ed601a463dc2d4ffd78
MD5 dbbeea56ffc89f08e6af2cb8f4408061
BLAKE2b-256 caa8ac9bbd26de64db975cb79b5dff5f0c677a4a7b0f23abdce875de2b95a42c

See more details on using hashes here.

File details

Details for the file asdfile-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: asdfile-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for asdfile-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a83b3df76b5f1f987ee8295e8b18d06c84f7a5b46dce3284b3cc49d3d7b90647
MD5 7dd8d0e52781161815592ece90d19437
BLAKE2b-256 f3fff74aced59af335ee838c73a5e1101cf777b105a1f199d37f047a0ca0e4f7

See more details on using hashes here.

Supported by

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