ctypes-based Python bindings for the mrsh CLI tool
Project description
mrsh
Thin, ctypes-based Python bindings for the mrsh CLI tool.
Installation
Install from PyPI:
pip install mrshw
Or directly from GitHub (tagged release v0.1.0b1):
pip install git+https://github.com/w4term3loon/mrsh.git@v0.1.0b1
Quickstart
import mrshw as mrsh
# Single-fingerprint API
fp = mrsh.fp("path/to/file.bin")
print(str(fp)) # metadata + hex-encoded Bloom filters
print(fp.meta()) # namedtuple: (name, filesize, filter_count)
# Fingerprint-list API
fpl = mrsh.fpl()
fpl.add("a.bin")
fpl.add(("b.bin", "label_b"))
print(str(fpl)) # multiple lines, one per fingerprint
# Compare all fingerprints in the list
results = fpl.compare_all(threshold=10)
for cmp in results:
print(cmp.hash1, cmp.hash2, cmp.score)
License
- Wrapper: MIT License (see LICENSE).
- Underlying C code: Apache License 2.0 (see github repository for details).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mrshw-0.1.0b2.tar.gz
(4.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mrshw-0.1.0b2.tar.gz.
File metadata
- Download URL: mrshw-0.1.0b2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14d16751e579d4de055edfdc9308c085e4d49513dbcdf7d26338a36f2ae0c5fa
|
|
| MD5 |
3dae594953a02b4ab26defc2441b9a26
|
|
| BLAKE2b-256 |
4fe3609be4fcff01b4e2eba4e6b7a8b2befd05f0f84fd3cc2c31ea4f229a19ae
|
File details
Details for the file mrshw-0.1.0b2-py3-none-any.whl.
File metadata
- Download URL: mrshw-0.1.0b2-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a97e0988808e996149b51ce54915c26138e64882178dbe4136329545a7fc0ea
|
|
| MD5 |
ced1a4809bd3214c173ca7fd26d40ab1
|
|
| BLAKE2b-256 |
643d1484185298734e86c144ca1b17e9118d8cd3fa74e5db811e80d6d67d678c
|