Skip to main content

Structured, metadata-enhanced data storage.

Project description

dsch

Introduction

Dsch provides a way to store data and its metadata in a structured, reliable way. It is built upon well-known data storage engines, such as the HDF5 file format, providing performance and long-term stability.

The core feature is the schema-based approach to data storage, which means that a pre-defined schema specification is used to determine:

  • which data fields are available

  • the (hierarchical) structure of data fields

  • metadata of the stored values (e.g. physical units)

  • expected data types and constraints for the stored values

In fact, this is similar to an API specification, but it can be attached to and stored with the data. Programs writing datasets benefit from data validation and the high-level interface. Reading programs can determine the given data’s schema upfront, and process accordingly. This is especially useful with schemas evolving over time.

For persistent storage, dsch supports multiple storage engines via its backends, but all through a single, transparent interface. Usually, there are no client code changes required to support a new backend, and custom backends can easily be added to dsch. Currently, backends exist for these storage engines:

Note that dsch is only a thin layer, so that users can still benefit from the performance of the underlying storage engine. Also, files created with dsch can always be opened directly (i.e. without dsch) and still provide all relevant information, even the metadata!

Reasoning

Dsch is a response to the challenges in low-level data acquisition scenarios, which are commonly found in labs at universities or R&D departments. Frequent changes in both hardware and software are commonplace in these environments, and since those changes are often made by different people, the data acquisition hardware, software and data consumption software tend to get out of sync. At the same time, datasets are often stored (and used!) for many years, which makes backwards-compatibility a significant issue.

Dsch aims to counteract these problems by making the data exchange process more explicit. Using pre-defined schemas ensures backward-compatibility as long as possible, and when it can no longer be retained, provides a clear way to detect (and properly handle) multiple schema versions. Also, schema based validation allows to detect possible errors upfront, so that most non-security-related checks do not have to be re-implemented in data consuming applications.

Note that dsch is targeted primarily at these low-level applications. When using high-level data processing or even data science and machine learning techniques, data is often pre-processed and aggregated with regard to a specific application, which often eliminates the need for some of dsch’s features, such as the metadata storage. One might think of dsch as the tool to handle data before it is filled into something like pandas.

Changelog

This project follows the guidelines of Keep a changelog and adheres to Semantic versioning.

0.2.0 - 2018-02-01

Added

  • New node type for bytes data.

  • In-memory backend, for handling data without needing e.g. a file on disk.

  • Support for copying data between different storages.

  • Support for creating new storages from existing ones, aka. “save as”.

  • PseudoStorage abstraction class for unified data access in libraries.

  • Human-readable tree-representation of data nodes for use in interactive sessions.

  • Support == operator for schema nodes.

Changed

  • Data nodes in Compilations and Lists can no longer be overwritten accidentally when trying to overwrite their stored value.

  • Improve structure and conciseness of docs.

  • Change List to evaluate empty-ness recursively.

  • Replace generic exceptions like TypeError by custom dsch exceptions.

0.1.3 - 2018-01-11

Changed

  • Attempting to open a non-existent file now shows a sensible error message.

  • Attempting to create an existing file now shows a sensible error message.

Fixed

  • Fix error when handling partially filled compilations.

  • Fix typo in documentation.

0.1.2 - 2017-08-25

Fixed

  • Fix incorrect ordering of list items.

0.1.1 - 2017-06-09

Added

  • Cover additional topics in documentation.

Fixed

  • Fix error when handling single-element lists with mat backend.

0.1.0 - 2017-05-18

Added

  • First preview release.

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

dsch-0.2.0.tar.gz (54.5 kB view details)

Uploaded Source

Built Distribution

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

dsch-0.2.0-py3-none-any.whl (37.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dsch-0.2.0.tar.gz
  • Upload date:
  • Size: 54.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for dsch-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2e898a7367c14748a3a0ec2563598accdfe5cdd8ada7d50edbe97b15d7389657
MD5 176a360ff1a5c893833b222333827761
BLAKE2b-256 6fc2ba69539fc797ce246f0c0b1b93a81b02a98013678672b892e2d7f3fac883

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsch-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 37.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for dsch-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 da8a9156d4139d8d9fa1e382024e483229e486f720c86c4d0367524afb7206b6
MD5 97dfbb0cc27600331f54311cf3480379
BLAKE2b-256 68a394aa0f9bb137a496418e8073951c7ad15147c923273ff1e0170efdd9dcd9

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