Skip to main content

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 be used in pure Rust environment as python-polars, numpy, pyo3 are optional features. You can use the Mdfr struct with its methods and eventually its rust-polars methods to manipulate data. Using rayon crate on many parts of the code allows to have fast 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 polars series
# 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)

It can also be used from Rust directly with the polars feature enabled:

# Cargo.toml
[dependencies]
mdfr = { version = "0.6", features = ["polars"] }
use mdfr::mdfreader::Mdf;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut mdf = Mdf::new("path/to/file.mf4")?;
    mdf.load_all_channels_data_in_memory()?;

    // Single channel as a Polars Series
    let series = mdf.get_channel_polars_series("channel_name")?;
    println!("{}", series);

    // All channels sharing a master as a DataFrame
    // pass None for channels that have no master channel
    let df = mdf.get_channel_polars_dataframe(Some("master_channel_name"))?;
    println!("{}", df);

    // All channel groups as a map of DataFrames keyed by master channel name
    let dataframes = mdf.get_polars_dataframes()?;
    for (master, df) in &dataframes {
        println!("master: {:?}\n{}", master, df);
    }

    Ok(())
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

mdfr-0.7.1-cp314-cp314-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.14Windows x86-64

mdfr-0.7.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

mdfr-0.7.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.0 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ ARM64

mdfr-0.7.1-cp314-cp314-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

mdfr-0.7.1-cp313-cp313-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.13Windows x86-64

mdfr-0.7.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

mdfr-0.7.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

mdfr-0.7.1-cp313-cp313-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

mdfr-0.7.1-cp312-cp312-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.12Windows x86-64

mdfr-0.7.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

mdfr-0.7.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

mdfr-0.7.1-cp312-cp312-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

mdfr-0.7.1-cp311-cp311-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.11Windows x86-64

mdfr-0.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

mdfr-0.7.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

mdfr-0.7.1-cp311-cp311-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

mdfr-0.7.1-cp310-cp310-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.10Windows x86-64

mdfr-0.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

mdfr-0.7.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

mdfr-0.7.1-cp310-cp310-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

mdfr-0.7.1-cp39-cp39-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.9Windows x86-64

mdfr-0.7.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

mdfr-0.7.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

mdfr-0.7.1-cp39-cp39-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file mdfr-0.7.1-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: mdfr-0.7.1-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 4.0 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for mdfr-0.7.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 1db39b6568ab96ec1e58853f60eccec349e62a100853ca6480e87306830579fd
MD5 983b08a5ec32e61535c5d83a45905cd9
BLAKE2b-256 d9bd9abee777f937ff85bee7bddb297a7281861bb9644c7e2d7a30d251488409

See more details on using hashes here.

File details

Details for the file mdfr-0.7.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mdfr-0.7.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b8e095c18e1d7d3f0e49c74594c7764641bf50bc5b57c360cb638f1660c20d14
MD5 72a89c0236b9b27dc54d81bc58b4d2a3
BLAKE2b-256 aa5befe60644cc4b03df80818e28ff82bcd385de2a308995e8a20bd3a7cb48b8

See more details on using hashes here.

File details

Details for the file mdfr-0.7.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mdfr-0.7.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c0b47e3ae453d51ac2941c772b9f6f047d327620723cd2d76ad95b008a840296
MD5 00d0f2832a2b0d2d56672aa9f891ea0e
BLAKE2b-256 3bcf81afda86178c7d46ffbb402a2e3fe006c8a2295eac20ad83a816f90ccc84

See more details on using hashes here.

File details

Details for the file mdfr-0.7.1-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mdfr-0.7.1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1670e11021396afc5e2a7ee9c5c7c0962a7d919dc03e05eb3e615d131f8bc7f0
MD5 acc477fd443937ee26d2b103f8e97ec6
BLAKE2b-256 a0d00228e0ccebc14665f64cfc01963e89b9293b476ac5c379d612c7f67ff4d1

See more details on using hashes here.

File details

Details for the file mdfr-0.7.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: mdfr-0.7.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for mdfr-0.7.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c5ed1b6ffc0d9c99179ba51a645d80230d4d83d8d87db91cb796ecf538af22df
MD5 9879499eda7bd27e3410b08810db95de
BLAKE2b-256 0e92fcac4ac4c205c1644f0f38de9e0d0e4abde1b64b99df9c15708b6a63da5a

See more details on using hashes here.

File details

Details for the file mdfr-0.7.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mdfr-0.7.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7a8537ad3f257f577386eb79573a3ae12a33a9d017cdc5c2500d4e88dd423f89
MD5 8f04503adb9a6530aa5996874bbf62cc
BLAKE2b-256 d67408c47bcc819701bec04a3c33d88c5f0525b0b8647accaf8ec69b346a85a9

See more details on using hashes here.

File details

Details for the file mdfr-0.7.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mdfr-0.7.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bd91f7dfa228a6a70ec9bc0833639c276ab85e9b3a737dd4991d4240fdf4fb2a
MD5 f430c94045e54d999a30fb2ecc070529
BLAKE2b-256 7275266568d7d7c2dba473d8a4660bb8105259136c551d7bbbbb9f67021c8e04

See more details on using hashes here.

File details

Details for the file mdfr-0.7.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mdfr-0.7.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ef1e24135462706dcc5bb2fe9d83244f69e63af6cecacd566a57a12e86ac2249
MD5 19edff35fcaa6d7ebaf510eb04372a8d
BLAKE2b-256 a0c638006db85c105b4b1121daab31dbb3389974abcbd6669594382d4207139d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mdfr-0.7.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 4.0 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for mdfr-0.7.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3921a2776d303382e764d0259c11537f28815dd98c935ffc81b6aed10c10d1f5
MD5 b04b3918bba22b45cc06a84e232be4af
BLAKE2b-256 cbf55c057d20eb1adf90e009cb51b0bfaeee1f8b405dbfa2fa13a8783d060be4

See more details on using hashes here.

File details

Details for the file mdfr-0.7.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mdfr-0.7.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a8362a9d3bb637c8bcf061a67c279cff2409aa29300b09c29ba9e77849413685
MD5 a46b5ee8a5445c3c726f93f7385a35d5
BLAKE2b-256 38a7b79f3539761dcf2e69baab71ea6edbdcde1c57c2bf207aaf2524de64e599

See more details on using hashes here.

File details

Details for the file mdfr-0.7.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mdfr-0.7.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 73c557debc4e7e83390f6b283c4e2aaaccb48aa49a2cc71424329fed34aa9a49
MD5 3ee3cd68f92581695937b6e553e84ac0
BLAKE2b-256 b9b2dde67c3187bbbf5f030fca9c4701cc729d8dbac1a2b3044e8aa1cd7db222

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mdfr-0.7.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 384e17392e5de9a65b06b6d27beff8f21f04c8ed8924437f7ad971582d8f1f78
MD5 cd9a64d1eb64bc93dee8b942c8829a22
BLAKE2b-256 b42cf712bac3e080e6993e0c9f805438dbde17c8dc7b74bb4937453854fbcd1c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mdfr-0.7.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 4.0 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for mdfr-0.7.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 24503477b756b340b2c647d0767317a6e1ef6e02f8d80abe34c3a2154bf0ede3
MD5 675b1048bdf8aeafeae6a329ba769973
BLAKE2b-256 32611ef43fb80e4a6b9bbe8f84d6e984d049ee88913f3ad9f2cf991f8c945652

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mdfr-0.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8b72e97c4ab2aad2b41056ba36c031950bc8be640a65149129edea174561d048
MD5 8a6ca4fa90e04caca8daa10d66115a3b
BLAKE2b-256 c19011777bcd871c8d4afed33e5e7a09e74741a0ab3d820c1b7d6d4c6f659838

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mdfr-0.7.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 40527cc3f58197ded9ff514339f0c4fff971103f1b8eda31389f4d7b60741751
MD5 6b774767baeda05068136c1a3b91be4e
BLAKE2b-256 2aa60ab14e4872563e87e923ed6ae8d9a9ce9d411d835dda9cb0372ab7e8178a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mdfr-0.7.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4ed8dccd8b6c6a431fd2eced88be223acf4e47f5ca422980f8e6331306c3f789
MD5 c885971e687c36cba330fe32df0180f5
BLAKE2b-256 a806cce68c4ce6cb961683c8f7b231af780f35a0ba29ee813def60625ac697c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mdfr-0.7.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 4.0 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for mdfr-0.7.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9cc06b184f210adaf5a95de573ef316236aeed3887c0fb0a3855004ba4014bd6
MD5 52343dbb8ac6f738ef5d44550f7f3faa
BLAKE2b-256 d2ac5e62dae52ba68494411eab40d0ffa832639d4767965382423cc62dac3580

See more details on using hashes here.

File details

Details for the file mdfr-0.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mdfr-0.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bb371b3a33e8a7784c321aec6966e03f41234c4826b8afcbf118fa1c3e6f36b4
MD5 29ee4d215ef6cb4ac9c8ea5c489760df
BLAKE2b-256 0aaadc94b884673f82ef78406f4f324b1d12f115e5beb52255668254da83d9cf

See more details on using hashes here.

File details

Details for the file mdfr-0.7.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mdfr-0.7.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0dd6e465c007bd4c0e9154a897e490e0124e4c10eac74fa3373d51379ded992a
MD5 40c664df2fc1b261f4a47d510a860fb2
BLAKE2b-256 99b0d5d17b92ac85d79984e185562758d6bafdd59f4847ea3070d39226353246

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mdfr-0.7.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 398543d0d26cd59dff258bd423ef0e388ed0a6d3d90084330a144de7c8dd16a9
MD5 94980861d2d31069e46d5d7f785de12a
BLAKE2b-256 6f1fa7cebc493479c8f0612cb7ef8479d3b05f03d20f6533d3b59df65a23d9fa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mdfr-0.7.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 4.0 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for mdfr-0.7.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 93532474825db10bcf6df90a971a66fca0283d12b53b439b36011241d46e0a00
MD5 bc4714bad45d97155fcf18e8dd855ca3
BLAKE2b-256 b9c95cb2989dd5fc8405579e9a2064693da5ba81cc04939de8440fd149001822

See more details on using hashes here.

File details

Details for the file mdfr-0.7.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mdfr-0.7.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d72c6dd3f4e40dc96b43e95c330a06dae03230a88e4a37c074de4034394e5f9b
MD5 cba47cb220b3d8d4f1ade4fd4eafb16a
BLAKE2b-256 8e2b7dd9080e1671d0091933898757a763c5188b9a7db65ce45b6687c2388d31

See more details on using hashes here.

File details

Details for the file mdfr-0.7.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mdfr-0.7.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5a721f37c427d671553b29add2f1359c4a609592e901b47d3f2cc89910c7d329
MD5 8e71f44eabf169c9bf78e8c0d6e96582
BLAKE2b-256 45247a27943f7809d25eb6ead399bae0267f04fdcf5a804335594cde6e8588a4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mdfr-0.7.1-cp39-cp39-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.9, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for mdfr-0.7.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9036ddf66c25f395d231980627eeea4c3e546d4eea66331e25e60ebb08193313
MD5 21d49fc9c4af566fbce431e669e36265
BLAKE2b-256 e03a19c91088b83f540c159771c0535083d86f9158818c6f674da05b0c4f9eaf

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