Skip to main content

A package for reading and writing MDF files

Project description

mdfr

ASAM mdf reader in rust

Currently a personal project to learn rust from past experience with python (mdfreader).

mdfr is currently able to be used from python interpreter (using pyO3) to read mdf 3.x and 4.x files. You can install it with 'pip install mdfr' command. It can also be used in pure Rust environment as polars, numpy, pyo3 are optional features Using rayon crate on many parts of the code allows to have faster parsing in a safe and easy way compared to python. To allow efficient data sharing with many other tools, mdfr stores the data using arrow. Polars (pandas equivalent) use is therefore also straight forward. A C/C++ api is also available allowing to get list of channels, units, description and data using the Arrow CDataInterface.

It can be used the following way with python interpreter:

import mdfr
# load file metadata in memory
obj = mdfr.Mdfr('path/to/file.mdf')
# loads all data in memory
obj.load_all_channels_data_in_memory()
# loads a set of channels in memory, for instance in case there is not enough free memory or for performance
obj.load_channels_data_in_memory({'Channel1', 'Channel2'})
# Returns the numpy array
obj.get_channel_data('channel_name')

# .get_channel_* methods to retrieve channel description, unit, related master name, type and data
# .set_channel_* methods to modify channel description, unit, related master name, type and data
# list of channels in file, or lists of channels grouped by master are available
obj.get_master_channel_names_set()

# To manipulate the file data (cut, resample, merge, etc.), it is possible to use polars:
obj.get_polars_series('channel_name') # returns the a serie
# to get complete dataframe including given channel:
obj.get_polars_dataframe('channel_name')
# add and remove channel
obj.add_channel(channel_name, data, master_channel, master_type, master_flag, unit, description)
# to plot a single channel with matplotlib:
obj.plot('channel_name')

# Export to parquet:
obj.export_to_parquet('file_name', compression_option)
# Export to hdf5:
obj.export_to_hdf5('file_name')
# write to mdf4 file, compressed or not
obj.write('file_name', conpression_algo)

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

mdfr-0.6.3.tar.gz (39.5 MB view details)

Uploaded Source

Built Distributions

mdfr-0.6.3-cp313-cp313-manylinux_2_35_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.35+ x86-64

mdfr-0.6.3-cp312-cp312-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.12Windows x86-64

mdfr-0.6.3-cp312-cp312-macosx_11_0_arm64.whl (3.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

mdfr-0.6.3-cp311-cp311-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.11Windows x86-64

mdfr-0.6.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

mdfr-0.6.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

mdfr-0.6.3-cp311-cp311-macosx_11_0_arm64.whl (3.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

mdfr-0.6.3-cp310-cp310-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.10Windows x86-64

mdfr-0.6.3-cp310-cp310-macosx_11_0_arm64.whl (3.5 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

mdfr-0.6.3-cp39-cp39-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.9Windows x86-64

mdfr-0.6.3-cp39-cp39-macosx_11_0_arm64.whl (3.5 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file mdfr-0.6.3.tar.gz.

File metadata

  • Download URL: mdfr-0.6.3.tar.gz
  • Upload date:
  • Size: 39.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.6

File hashes

Hashes for mdfr-0.6.3.tar.gz
Algorithm Hash digest
SHA256 e9d905143a702c0931fe7ed4cb2922d63a9a68444f5e52a78c1b199d4c9c94ca
MD5 edc8997a79654f31f896c23058d1ee0c
BLAKE2b-256 8ca46eb507434c74c8d21eea7951785f3d8bc5e33a4b7416698d94afcbf5b431

See more details on using hashes here.

File details

Details for the file mdfr-0.6.3-cp313-cp313-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for mdfr-0.6.3-cp313-cp313-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 1e67af024adda3cc842665f3b533afc81ea30872bfd4fcc36bb5910224cd8ca4
MD5 96caf96e050d54af679e685dea91474e
BLAKE2b-256 c36c530be648f1bc879e9668743c7f1f1fb6c05cafbddce6b68c7b3892f30040

See more details on using hashes here.

File details

Details for the file mdfr-0.6.3-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: mdfr-0.6.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 4.1 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.4

File hashes

Hashes for mdfr-0.6.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0b765b215fd249a686f87e590fd68f1f07c65e412dd51cba73e319caa89f0e9f
MD5 ac9a28ef718bf1376b86591cabd24848
BLAKE2b-256 e599c52642faa2fb158af2ccb119318c92f09438ba52db8892277ab4c7209857

See more details on using hashes here.

File details

Details for the file mdfr-0.6.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mdfr-0.6.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 864f3b91cba1e35cef7f2160e09262644e54bfe89d7e92c4bcbada1fa2fcbe04
MD5 34272028fc246fb8012fc64cb0634fc9
BLAKE2b-256 755ceb5b4f48da841378d1adae97e1955de51f8228fa4d803894614fd0d449ff

See more details on using hashes here.

File details

Details for the file mdfr-0.6.3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: mdfr-0.6.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 4.1 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.4

File hashes

Hashes for mdfr-0.6.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b65db7fa9e08d29d1fe0e8dc917a5d4486974ed0bf3bbd15781018fdcf6c6e03
MD5 1f79a7b05ab93708acb8d63dfeb8932b
BLAKE2b-256 6865cf00344f9e7993c94a5cba5c8b2243972287a9730e704bb757c44faef91d

See more details on using hashes here.

File details

Details for the file mdfr-0.6.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mdfr-0.6.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7f6cb69ffc5f36812ef1a0ba7754bcaf23d472e382246eaa470a3138717336d5
MD5 46f6c8cc6f629216802fd682ec2079b4
BLAKE2b-256 98301f53c53fec3c1d8fd73d9cf4c352a92c680c8b2fc6bc26925d26b4125407

See more details on using hashes here.

File details

Details for the file mdfr-0.6.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mdfr-0.6.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bbd602e9bbdea526233eddf40b866c78aef1bf5251dd6e0cf164a8b765681f98
MD5 23a5cc0aef89eaa5d6a3b9c4b349d76b
BLAKE2b-256 a4227c96e420709236e1f193d922145d3382974b04cf44fe67252e809095fc61

See more details on using hashes here.

File details

Details for the file mdfr-0.6.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mdfr-0.6.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4cb3911a8f4881ff5402a33a6a15b0c9270aeb21a95554635e47f6cbd2f36102
MD5 68595ea48b892feb53c60e44dee5dbba
BLAKE2b-256 a0e831e1c84f941e26ff653a08dbaae42855d408ebbd873aab9ca47d40c7cbd7

See more details on using hashes here.

File details

Details for the file mdfr-0.6.3-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: mdfr-0.6.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 4.1 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.4

File hashes

Hashes for mdfr-0.6.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6c21400ebb44a2baecd5caedb4ff6058be0f5c50018733ee1927ccf2e9054831
MD5 3e05730e494db34c594bfa09e81cfdb9
BLAKE2b-256 51773049e4f6ed24bcd521be43b334cbc0a3dd24c1d1051a1f4c0e3f3d85dd98

See more details on using hashes here.

File details

Details for the file mdfr-0.6.3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mdfr-0.6.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b97476f462870f79152edbd45356a5f4ec7fe208c1216af88fddaee7241ffad5
MD5 ba36556bbd03056ff05ab16aaa59628e
BLAKE2b-256 f7570251886deb846e8c3b05844149d362323ee556483763ea5c29f37006fcce

See more details on using hashes here.

File details

Details for the file mdfr-0.6.3-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: mdfr-0.6.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 4.1 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.4

File hashes

Hashes for mdfr-0.6.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ca31f3ecc1d9445d54c551a67cdeea9a8e2703347402652d5c4395b585ebd65a
MD5 c368a845012bc6440c9b0c1a61032e88
BLAKE2b-256 3cc7053c867171496805aba605c13ca81cc1c34bc5cf09295efac0ffbdc38150

See more details on using hashes here.

File details

Details for the file mdfr-0.6.3-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mdfr-0.6.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a4a24e6a9b4578d43fd6f7af64e7514531693d30c5f56617b6372bf14a75d19b
MD5 b5855221a00eed60f0a37659c8185433
BLAKE2b-256 c0f77a03a5406810287e102ca10b3962ed7982e8e7e1f9cab2bcd7a81639ff2f

See more details on using hashes here.

Supported by

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