Skip to main content

SDDS file handling.

Project description

SDDS

Cron Testing Code Climate coverage Code Climate maintainability (percentage)

PyPI Version GitHub release Conda-forge Version DOI

This package provides reading and writing functionality for self describing data sets (sdds) files. On the python side, the data is stored in a class structure with attributes corresponding to the sdds-format itself (see sdds-format).

See the API documentation for details.

Installing

Installation is easily done via pip:

python -m pip install sdds

One can also install in a conda environment via the conda-forge channel with:

conda install -c conda-forge sdds

Example Usage

import sdds

sdds_data = sdds.read("path_to_input.sdds")
sdds.write(sdds_data, "path_to_output.sdds")

Read files with different endianness

By default the endianness (byte order) of the file is determined either by a comment !# little-endian or !# big-endian in the header of the file. If this comment is not found, the endianness of the running machine is assumed.

One can force a certain kind of endianness to the reader by supplying it to the read function:

import sdds

sdds_data = sdds.read("path_to_input_with_big_endian.sdds", endianness="big")
sdds_data = sdds.read("path_to_input_with_little_endian.sdds", endianness="little")

Be aware that sdds.write will always write the file in big-endian order and will also leave a comment in the file, so that the reader can determine the endianness and there is no need to supply it when reading a file written by this package.

Known Issues

  • Can't read binary columns
  • No support for &include tag

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

sdds-0.3.0.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

sdds-0.3.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file sdds-0.3.0.tar.gz.

File metadata

  • Download URL: sdds-0.3.0.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.13

File hashes

Hashes for sdds-0.3.0.tar.gz
Algorithm Hash digest
SHA256 fcaa75146c486ff3b68d486483cd02c26de2596c68af825e403e78933754cea2
MD5 e095bdd63ffc74ceb6a7abd662a6b39b
BLAKE2b-256 5b45f222e930f0913c484494795f6150bf6e5e98c05213c0850456352ede1b65

See more details on using hashes here.

File details

Details for the file sdds-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: sdds-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.13

File hashes

Hashes for sdds-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7aaae421dab0a174c1d2cebd323f0ba2519dd19734dbea9aee0a3cb463c70870
MD5 2f69038fff9f487fb4a70b68391fdffe
BLAKE2b-256 0ad552641c81986aac4ec16f7bfedbe2e6c5da246e834b56a6a098a27d3738db

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