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. 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 arrow2. Polars (pandas equivalent) use is therefore also straight forward. It can be used the following way with python interpreter:

import mdfr
# load file metadata in memory
obj = mdfr.Mdf('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)
# write to mdf4 file, compressed or not
obj.write('file_name', conpression_flag)

A C/C++ api is also available allowing to get list of channels, units, description and data using the Arrow CDataInterface.

Project details


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.4.0-cp310-none-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.10Windows x86-64

mdfr-0.4.0-cp310-cp310-macosx_10_9_arm64.whl (2.4 MB view details)

Uploaded CPython 3.10macOS 10.9+ ARM64

mdfr-0.4.0-cp310-cp310-macosx_10_7_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.10macOS 10.7+ x86-64

mdfr-0.4.0-cp39-none-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.9Windows x86-64

mdfr-0.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

mdfr-0.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

mdfr-0.4.0-cp39-cp39-macosx_10_9_arm64.whl (2.4 MB view details)

Uploaded CPython 3.9macOS 10.9+ ARM64

mdfr-0.4.0-cp39-cp39-macosx_10_7_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.9macOS 10.7+ x86-64

mdfr-0.4.0-cp38-none-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.8Windows x86-64

mdfr-0.4.0-cp38-cp38-macosx_10_9_arm64.whl (2.4 MB view details)

Uploaded CPython 3.8macOS 10.9+ ARM64

mdfr-0.4.0-cp38-cp38-macosx_10_7_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.8macOS 10.7+ x86-64

mdfr-0.4.0-cp37-none-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.7Windows x86-64

mdfr-0.4.0-cp37-cp37m-macosx_10_7_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.7mmacOS 10.7+ x86-64

File details

Details for the file mdfr-0.4.0-cp310-none-win_amd64.whl.

File metadata

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

File hashes

Hashes for mdfr-0.4.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 24958e4cf6cfc0deef9066194d40c332970a6c7eb9482ded3e0b44e86ae44834
MD5 ce808497380ffe69c551c35bb3060180
BLAKE2b-256 6b7d10f4afd5e56441913746b99b450a271da0686b0e9549e4322f7d3816fad3

See more details on using hashes here.

File details

Details for the file mdfr-0.4.0-cp310-cp310-macosx_10_9_arm64.whl.

File metadata

File hashes

Hashes for mdfr-0.4.0-cp310-cp310-macosx_10_9_arm64.whl
Algorithm Hash digest
SHA256 837e3cc333540da50cf82ee14a08a9f5ed909a6dfe0dc961b6431ad829d78f63
MD5 a9bfaa798db72933582f2337a8a88bae
BLAKE2b-256 8ad36190b3c3d00856a8f765dae56fcef355f4a6491b177a4d4e7578ee7bc917

See more details on using hashes here.

File details

Details for the file mdfr-0.4.0-cp310-cp310-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for mdfr-0.4.0-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 069d635729b028ef52c6ba16382e0e5ae76b4a9b3eb51c0f19a0a07750bdaac6
MD5 0e00757b26819384534f3ed4cced1de8
BLAKE2b-256 30296fedaaa43ec60e0e6a0591c43a380728c9602f58771a69439ea8a725fc62

See more details on using hashes here.

File details

Details for the file mdfr-0.4.0-cp39-none-win_amd64.whl.

File metadata

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

File hashes

Hashes for mdfr-0.4.0-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 39e5595baae0b4c20afdb1d1039b19ca13386dcb7c746cc2741a040ecd9c4d87
MD5 c27cfb37e87bf9a53f53e33d1f567e4f
BLAKE2b-256 973bac11a0b5ac32cb5c3dc3d60b575ac1da20c7174412586a2015fb2412e498

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mdfr-0.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4e0cded8a8985dea00f63a1f37f7ae28855c5ef24f450e1e92037440d43b84dd
MD5 c23a0a4427c5a14f844bcf3ff380207b
BLAKE2b-256 4b6abd992464157c5ee78c1d9a013682fd802fe5fbd98af5e4074bc5365efe86

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mdfr-0.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cf7d7ccba09bbbfb0b61c98ba5c88fea380771863445aa749426b85be12bd819
MD5 045ae3b04fcda5fd9997d78987d2101f
BLAKE2b-256 69926e8a21ab9eac24d927fd82ff9e2c109272252e03a05dd81e77ea86595012

See more details on using hashes here.

File details

Details for the file mdfr-0.4.0-cp39-cp39-macosx_10_9_arm64.whl.

File metadata

File hashes

Hashes for mdfr-0.4.0-cp39-cp39-macosx_10_9_arm64.whl
Algorithm Hash digest
SHA256 458ddac66b071b8b553c8c74e920e2e4c7fb902ced3a8213770e4e1230aacd4f
MD5 f2bab6ef2a1353bce9c86a75333f5c1a
BLAKE2b-256 891e7371e8b95dbdc5011149d24dd292eedf906dbc91a1dd875dc608fa4e19b4

See more details on using hashes here.

File details

Details for the file mdfr-0.4.0-cp39-cp39-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for mdfr-0.4.0-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 84740a9c96ebc16ce1dc3c9d9ec6675c917304450387f4b7ac186e0fb01725f9
MD5 baab40b86ccd3ad0f4858ddbd0cf0e0f
BLAKE2b-256 b0ce490ed110291a6bb3dc025d7f20168fb7ae877a43ae377f7002192ba085fa

See more details on using hashes here.

File details

Details for the file mdfr-0.4.0-cp38-none-win_amd64.whl.

File metadata

  • Download URL: mdfr-0.4.0-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.2

File hashes

Hashes for mdfr-0.4.0-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 83e7cab593b16024cdab56735719bf0a6432d1b3ec3a601366725851b239460a
MD5 3c6251397383e6ce9a1bcc03b969302c
BLAKE2b-256 edbf4ac28963def36f8bbab06db73d8cfda2206098d240d3b88169ca9aa6a83b

See more details on using hashes here.

File details

Details for the file mdfr-0.4.0-cp38-cp38-macosx_10_9_arm64.whl.

File metadata

File hashes

Hashes for mdfr-0.4.0-cp38-cp38-macosx_10_9_arm64.whl
Algorithm Hash digest
SHA256 46b225e23c264b83b0614128decb0c1cc192680c5729b719382e6e871efb9de3
MD5 a1bcc98b639666e67dfd4b08c05c0fb6
BLAKE2b-256 5c66f81842871e3e67e1ace3f71c4637b89c2d57ef6100b6f304534c5d1e211d

See more details on using hashes here.

File details

Details for the file mdfr-0.4.0-cp38-cp38-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for mdfr-0.4.0-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 bf1f8522662d0efe4c22a9579126f86b3c426e4518d8b0a2a28182780a9cb1ff
MD5 51246078ebc2a98bbc4c01aaacdc2125
BLAKE2b-256 f8d5840afeaafd310c0e67abd9c3e4dff02d96ff7e1daf137513e829ad7340e5

See more details on using hashes here.

File details

Details for the file mdfr-0.4.0-cp37-none-win_amd64.whl.

File metadata

  • Download URL: mdfr-0.4.0-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.7, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.2

File hashes

Hashes for mdfr-0.4.0-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 d0efc4c26e5d62b33abf21956ec80c79e195c769c2cdc22874729483a61b3c00
MD5 7b55bb4efdc03582c0626b3ff35362c1
BLAKE2b-256 1eeb79bcb419032140ec1b54abbd9295e3e168aa3d21d4d8419dd7906b4bd8c4

See more details on using hashes here.

File details

Details for the file mdfr-0.4.0-cp37-cp37m-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for mdfr-0.4.0-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 52915951dadabf1d9686f9069c5e136b448821131d6bae0db5251d7d6de44f19
MD5 2c1cdd05d3254bdf0743bc754097afaa
BLAKE2b-256 1686bc902540d3075660c5538fa337966daed4a25001fa859f62ab3062cc5863

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