Skip to main content

Chd parser Python binding

This small project is a binding to the chd part of the rust project imageparse done for its capability to access chd files decompressed bytes, even those with parents, recognize the track boundaries, and calculate their sha1 checksums.

Upstream has some limitations still:

  1. Will not load hard drive chds, since it’s out of scope of the project.

  2. Will not yet read gdi chds, although that’s possible in the future.

  3. Like the upstream it depends on, chd-rs it can’t write a new chd.

  4. It is not actually a filesystem mounter, it only accesses the raw decompressed bytes and recognizes track boundaries.

You can access the chd track sha1 checksums of b.chd with parent a.chd like this:

import chdimage
chd = chdimage.open_with_parent('b.chd', ['a.chd'])
sha1sums = [ bytes(x).hex() for x in chd.track_sha1s() ]

Chd files that aren’t parents are ignored, so you can choose your own strategy to find parents:

chd = chdimage.open_with_parent('b.chd', ['not_b_parent.chd', 'a.chd'])

You can iterate over the track bytes like this:

for x in range(0,chd.num_tracks()):
  event = None
  #tracks go from 1 to num_tracks(), 0 does not count
  print(f'track {x+1}')
  while event != Event.TRACKCHANGE and event != Event.ENDOFDISC:
    sector = chd.copy_current_sector()
    event = chd.advance_position()
    #printing bytes is useless and lossy, do something else
    print(bytes(sector).decode(errors='replace'))

Metadata

Release files for chdimage 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for chdimage 0.2.1
File Actions
chdimage-0.2.1-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details for chdimage-0.2.1-cp38-abi3-win_amd64.whl
chdimage-0.2.1-cp38-abi3-win32.whl CPython 3.8 abi3 Windows x86-32 Details for chdimage-0.2.1-cp38-abi3-win32.whl
chdimage-0.2.1-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl CPython 3.8 abi3 Linux glibc 2.17+ IBM System/390x Details for chdimage-0.2.1-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
chdimage-0.2.1-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl CPython 3.8 abi3 Linux glibc 2.17+ PowerPC 64-le Details for chdimage-0.2.1-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
chdimage-0.2.1-cp38-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl CPython 3.8 abi3 Linux glibc 2.17+ PowerPC 64-be Details for chdimage-0.2.1-cp38-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
chdimage-0.2.1-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl CPython 3.8 abi3 Linux glibc 2.17+ ARMv7l Details for chdimage-0.2.1-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
chdimage-0.2.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.8 abi3 Linux glibc 2.17+ ARM64 Details for chdimage-0.2.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
chdimage-0.2.1-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl CPython 3.8 abi3 Linux glibc 2.5+ x86-64 Details for chdimage-0.2.1-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
chdimage-0.2.1-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl CPython 3.8 abi3 Linux glibc 2.5+ x86-32 Details for chdimage-0.2.1-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl
chdimage-0.2.1-cp38-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl CPython 3.8 abi3 macOS 10.9+ x86-64, macOS 11.0+ ARM64, macOS 10.9+ universal2 (ARM64, x86-64) Details for chdimage-0.2.1-cp38-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
chdimage-0.2.1-cp38-abi3-macosx_10_7_x86_64.whl CPython 3.8 abi3 macOS 10.7+ x86-64 Details for chdimage-0.2.1-cp38-abi3-macosx_10_7_x86_64.whl

Total release size: 10.5 MB

Release files / chdimage-0.2.1-cp38-abi3-win_amd64.whl

Download URL chdimage-0.2.1-cp38-abi3-win_amd64.whl
Size 270.3 kB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e27385784e16a9ddcaa6bd6a1afbd72da6d0666da772d9f7a81b613d8833079e
BLAKE2b-256 checksum
How to use checksums
4c32c200440fc63caa72f1c6fe164efd3a6b7bb578a5ac7d907105220070d68c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / chdimage-0.2.1-cp38-abi3-win32.whl

Download URL chdimage-0.2.1-cp38-abi3-win32.whl
Size 254.7 kB
Tags CPython 3.8 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
c2e64db4b5c39c6e6ef2d6e992cee1977e39354d9d07f5048a9fce20beb6db50
BLAKE2b-256 checksum
How to use checksums
785302dad0fa94150937ff99599862162fc31a7de97362768a465e2894c67df9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / chdimage-0.2.1-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl

Download URL chdimage-0.2.1-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Size 1.4 MB
Tags CPython 3.8 Linux glibc 2.17+ IBM System/390x abi3
SHA-256 checksum
How to use checksums
884424494fe05486244164012173380afb1aaa4e975fb36ea22da616df38f280
BLAKE2b-256 checksum
How to use checksums
b41f93e6054c4b26755e27ade981a3055ff8e8d03b3f8f28ab7a7e29c27d0059
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / chdimage-0.2.1-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl

Download URL chdimage-0.2.1-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Size 1.3 MB
Tags CPython 3.8 Linux glibc 2.17+ PowerPC 64-le abi3
SHA-256 checksum
How to use checksums
dd1f1efb359238a090d945d930497ee3d8b463f0407a3b99654ec91de586dca8
BLAKE2b-256 checksum
How to use checksums
b9399bc702eb9b6f97949019dbff8dc6575cefd5eef345b4e40b1f55e6155e9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / chdimage-0.2.1-cp38-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl

Download URL chdimage-0.2.1-cp38-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Size 1.3 MB
Tags CPython 3.8 Linux glibc 2.17+ PowerPC 64-be abi3
SHA-256 checksum
How to use checksums
4264f692e453ceb803129fcc23bbb02f8c5040bd965118280a52aa7396bc8774
BLAKE2b-256 checksum
How to use checksums
10ad80210f36fe9204b691e31c5aa0d7fc2260c1bba48d3eb24b19c8c692cac3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / chdimage-0.2.1-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl

Download URL chdimage-0.2.1-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Size 1.2 MB
Tags CPython 3.8 Linux glibc 2.17+ ARMv7l abi3
SHA-256 checksum
How to use checksums
60c758e470825b2b1ddfbe7af854bc332532408ce1d221c7c5c54997dcc1d0a6
BLAKE2b-256 checksum
How to use checksums
10d545abff7113e2c578edff9e2b35052363d3e234f24d98b1ccd3bb948736a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / chdimage-0.2.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL chdimage-0.2.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.2 MB
Tags CPython 3.8 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
3b569a1271856e4e3dd63a1a1afba9e741d90ebe895b210b78d27e8c9dd142c2
BLAKE2b-256 checksum
How to use checksums
5c4519c61d61f71e2805879218e97ecfacad30b23571558c5c9d83400807bc5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / chdimage-0.2.1-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL chdimage-0.2.1-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 1.2 MB
Tags CPython 3.8 Linux glibc 2.5+ x86-64 abi3
SHA-256 checksum
How to use checksums
e49f10058087cdbd3fd357e0e70fde4b7fa855f2f6e1555674104454c9033a9a
BLAKE2b-256 checksum
How to use checksums
9bba629e80737ff6af43a268362484d688fbdef2f98e740de3a530351950e8bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / chdimage-0.2.1-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl

Download URL chdimage-0.2.1-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Size 1.2 MB
Tags CPython 3.8 Linux glibc 2.5+ x86-32 abi3
SHA-256 checksum
How to use checksums
08dc311a76d55f4f6b6916cf898c4ceda7df08f2119b58135a599b5bb6f9108b
BLAKE2b-256 checksum
How to use checksums
8ea053a79232cfdda2c2242e86c1798470984d3b4ee4400edab1198d8052e459
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / chdimage-0.2.1-cp38-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl

Download URL chdimage-0.2.1-cp38-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 769.3 kB
Tags CPython 3.8 abi3 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
0cf6c28f1caadef867f74f5ad02a4f742c6927a664a224315b34a18559b838bf
BLAKE2b-256 checksum
How to use checksums
9ca1d50b6d393f548027a682ee3bffe2aefd450f111c38f9a2c7b1076040a5eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / chdimage-0.2.1-cp38-abi3-macosx_10_7_x86_64.whl

Download URL chdimage-0.2.1-cp38-abi3-macosx_10_7_x86_64.whl
Size 394.4 kB
Tags CPython 3.8 abi3 macOS 10.7+ x86-64
SHA-256 checksum
How to use checksums
f25ce3017c66ad38b44b75b55ce9738ea579f098cb598decf0a98fdd43b29325
BLAKE2b-256 checksum
How to use checksums
72e39157994bdc6f04ce1878aa7823c95d67c961613f6000356df29a18d0db93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for chdimage 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page