Skip to main content

No project description provided

Project description

pymft-rs

Python bindings for https://github.com/omerbenamram/mft/.

Installation

Available on PyPi - https://pypi.org/project/mft/.

To install from PyPi - pip install mft

Wheels

Wheels are currently automatically built for python 3.6,3.7,3.8,3.9 for all 64-bit platforms (Windows, macOS, and manylinux).

Installation from sources

Installation is possible for other platforms by installing from sources, this requires a rust compiler and setuptools-rust.

Run python setup.py install

Usage

Note that the iterators created by parser.entries() and entry.attributes() may return RuntimeError objects if there was an error while trying to parse one of the attributes, so check them before continuing.

from mft import PyMftParser, PyMftAttributeX10, PyMftAttributeX30

def main():
    parser = PyMftParser("/Users/omerba/Workspace/pymft-rs/samples/MFT")
    for entry_or_error in parser.entries():
        if isinstance(entry_or_error, RuntimeError):
            continue

        print(f'Entry ID: {entry_or_error.entry_id}')

        for attribute_or_error in entry_or_error.attributes():
            if isinstance(attribute_or_error, RuntimeError):
                continue

            resident_content = attribute_or_error.attribute_content
            if resident_content:
                if isinstance(resident_content, PyMftAttributeX10):
                    print(f'Found an X10 attribute')
                    print(f'Modified: {resident_content.modified}')
                if isinstance(resident_content, PyMftAttributeX30):
                    print(f'Found an X30 attribute')
                    print(f'Modified: {resident_content.modified}')
                    print(f'Name: {resident_content.name}')

        print('--------------------------------')

Will print:

Entry ID: 0
Found an X10 attribute
Modified: 2007-06-30 12:50:52.252395+00:00
Found an X30 attribute
Modified: 2007-06-30 12:50:52.252395+00:00
Name: $MFT
--------------------------------
Entry ID: 1
Found an X10 attribute
Modified: 2007-06-30 12:50:52.252395+00:00
Found an X30 attribute
Modified: 2007-06-30 12:50:52.252395+00:00
Name: $MFTMirr
--------------------------------
.....

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

mft-0.6.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

mft-0.6.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

mft-0.6.1-cp39-none-win_amd64.whl (258.2 kB view details)

Uploaded CPython 3.9 Windows x86-64

mft-0.6.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

mft-0.6.1-cp39-cp39-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

mft-0.6.1-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (803.2 kB view details)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

mft-0.6.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

mft-0.6.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

mft-0.6.1-cp37-abi3-win_amd64.whl (259.5 kB view details)

Uploaded CPython 3.7+ Windows x86-64

mft-0.6.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ x86-64

mft-0.6.1-cp37-abi3-macosx_11_0_arm64.whl (1.7 MB view details)

Uploaded CPython 3.7+ macOS 11.0+ ARM64

mft-0.6.1-cp37-abi3-macosx_10_7_x86_64.whl (409.7 kB view details)

Uploaded CPython 3.7+ macOS 10.7+ x86-64

File details

Details for the file mft-0.6.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mft-0.6.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 79180dcefaaa62a6db0eb21d1f405b31ddd3e04d26818a90080910b62cbba3f5
MD5 4c5a8b1e245d3e278ee2034ff25cc453
BLAKE2b-256 2f31e118dd40721d6974131975341497702d50ec8a44eecc7cb3d9faa12ac6e9

See more details on using hashes here.

File details

Details for the file mft-0.6.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mft-0.6.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9f65730435aabc1367f8dc2bfc5b3bf2cd86d358afe264a82bfc966cd100f6d3
MD5 5e7d823dd7f3fe43ebe1d408d25680a7
BLAKE2b-256 9b39fada4783074d8a86c0bbe7d0b790fa0e5d36c5c89f6e5abed19ca56dc22d

See more details on using hashes here.

File details

Details for the file mft-0.6.1-cp39-none-win_amd64.whl.

File metadata

  • Download URL: mft-0.6.1-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 258.2 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.13

File hashes

Hashes for mft-0.6.1-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 5b027fb7c641b5e7ac02856dda8e4fe9720fd37c44c6ae9b7f723e094cf20375
MD5 c2dbe96336f7662129fde081a5818f04
BLAKE2b-256 d292a8de3fdfad02540c3f968d1e8ed50334cca248203c1f5e0fac41c74427ca

See more details on using hashes here.

File details

Details for the file mft-0.6.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mft-0.6.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 148bb85f3caf86ce4b404aa03a4801dbb2355fc15c351f04a5a189c54ea7dc22
MD5 d7ddab929548041e994f77d9d89d43e0
BLAKE2b-256 da9cc458e10ef37770d7943f565ea480807015f7bd7fe312f3c0b651c072f2b4

See more details on using hashes here.

File details

Details for the file mft-0.6.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mft-0.6.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d3973c20f5f0b66f330a74d8b88487d2471fa87fdea65dee30b64483bd561549
MD5 407fb07da17118e0e8b887105d3397de
BLAKE2b-256 c0ee5782828100198c58f5a168b376b4f2ec5e688390b792841f8d13d83b4507

See more details on using hashes here.

File details

Details for the file mft-0.6.1-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for mft-0.6.1-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 466ba49d9d9a10bf4c32885c60a35acdec6f0172b866fdb6c63f9fbe25425f2f
MD5 fdb99a1cdf623f1838d2d53ae0c9d06d
BLAKE2b-256 6d4644356469598768a2ef3de1a8fd30cf9470b8985e3db2e480e32dc550477c

See more details on using hashes here.

File details

Details for the file mft-0.6.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mft-0.6.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e19fd042fbb8f12d727be428d8ed3c956ffaa17f133d8795d2835656437cb97f
MD5 505c82640c0859e98d582121d6ab114e
BLAKE2b-256 d704eea2ffe18b50a17202d94d605a4dc34f1b118ea8c1fa617e2f0195927aad

See more details on using hashes here.

File details

Details for the file mft-0.6.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mft-0.6.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7d15e5466ccb0fcbd81b4434f550463d17068b485bf69bf3836820d5a3cff925
MD5 3ac501732c48fee253d6bcef4354e300
BLAKE2b-256 e9379002ddc3d60eec9e4a3d271dcd7268ced267d924ca5eadabf7c1dd7f37e0

See more details on using hashes here.

File details

Details for the file mft-0.6.1-cp37-abi3-win_amd64.whl.

File metadata

  • Download URL: mft-0.6.1-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 259.5 kB
  • Tags: CPython 3.7+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.13

File hashes

Hashes for mft-0.6.1-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9aa21e8729cdfbd2d1e3df058fe2d4743a1f2cfd085c895b1c0630433dd50529
MD5 84e087f77c3ac5b83113a11ab558ca75
BLAKE2b-256 a8a66ae29142293e79124886c0aa267900b4e79fcfa1e0b38e279ff493fb2948

See more details on using hashes here.

File details

Details for the file mft-0.6.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mft-0.6.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6279bf9ed1985004ab127df3db56b3562814d0b1e136723ad67bd27d2b43e11a
MD5 84f1c45799c986e303c041a52103fa22
BLAKE2b-256 fce8825d2cd9c96cc7d4b48b2fa2dcff16c1e6686d342a774ed8b46b3aafacbc

See more details on using hashes here.

File details

Details for the file mft-0.6.1-cp37-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mft-0.6.1-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3ce3e9f2ee64e257d0ba21eff74747f143061d50efcd5c833f639a58d31eb369
MD5 9bf771b1808596a4b2883bb7c7522b40
BLAKE2b-256 b6724bef696a244810851edc9e065c770f0b502f9f185583421680cb1f09ba15

See more details on using hashes here.

File details

Details for the file mft-0.6.1-cp37-abi3-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for mft-0.6.1-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 b6212a2dfc546e2c089f8240096a8ba407385bb42f147d4ed4f8f242b04c7cac
MD5 cbe33a0f2749253bcc93f847b241200e
BLAKE2b-256 5f6e6cfbcd20a93912754fd4bd0d24a896973d54fea7989e6f43ba14469829f9

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