Skip to main content

Python Tests

libiso

libiso is Rust backed Python library for burning images on USB drives.

Installation

pip install libiso

  • Developed on Linux / Python 3.14
  • Tests are run on and wheels are available for Linux (+ Alpine) / Windows / MacOS / FreeBSD

Usage

import libiso

for drive in libiso.list_removable_drives():
   # Summary - drive.device_path, drive.display_name, drive.total_space_bytes
   print(drive)   

# Name:  USB Flash Disk - 239 GB (/dev/sda)
# Path:  /dev/sda
# Size:  256691404800 bytes

stats = libiso.inspect_image('/path/to/manjaro-kde-26.0.4-260327-linux618.iso')
print(stats)

# Volume Label:      MANJARO_KDE_2604
# Size:              5669099520 bytes
# ISOHybrid:         true
# Large File (>4GB): false
#
# --- Boot Info ---
# Bootable:          true (BIOS: true, UEFI: true)
# Secure Boot:       false
#
# --- Windows Metadata ---
# Is Windows:        False


import tempfile, os, time 

'''
- Unix and Windows treat physical block devices as files (e.g., /dev/sdb)
- libiso's Rust writing backend is abstracted via standard Read/Write/Seek traits
- These snippets use Tempfiles for demonstartion purposes, as do the tests
'''

with (tempfile.NamedTemporaryFile(delete=False) as dest_fd, 
      tempfile.NamedTemporaryFile(delete=False) as source_fd):
   dest_fd.write(b'\x00' * (128 * 1024 * 1024)) 
   source_fd.write(os.urandom(100 * 1024 * 1024))


def show_progress(total, written, mode, sleep_interval=0.05):

   time.sleep(0.05)   # For visual effect
   percent = (written / total) * 100 if total > 0 else 0
   bar = ('█' * int(40 * written / total)).ljust(40, '-')
   print(f'\r\033[K{mode} Mode Write:  |{bar}| {percent:.1f}% ({written}/{total} bytes)', end='')

# Writing in DD mode
for event in libiso.write_image_dd(source_fd.name, dest_fd.name):
    show_progress(event.total, event.written, 'DD')

# DD Mode Write:  |████████████████████████████████████████| 100.0% (209715200/209715200 bytes)


'''
           ---- Writing in ISO mode  ---
- has_large_file = True makes libiso utilize FAT32 + exFAT setup
- Pulling uefi-ntfs.img
-  libiso places the UEFI bridge image int the small FAT32 partition, that then loads the actual exFAT partition with the ISO
'''

with (tempfile.NamedTemporaryFile(delete=False) as dest_fd, 
      tempfile.NamedTemporaryFile(delete=False) as source_fd):
   dest_fd.write(b'\x00' * (128 * 1024 * 1024)) 
   source_fd.write(libiso.create_mock_iso(
      'TEST_ISO', ['EFI/BOOT/BOOTX64.EFI', 'KERNEL.BIN'], True, 50))   # 50Mb for each of the 2 files

uefi_bridge_path = libiso.ensure_uefi_bridge()
for event in libiso.write_image_iso(
   source_fd.name, dest_fd.name, True, 'GPT', uefi_bridge_path
   ):   
   show_progress(event.total, event.written, 'ISO')

# ISO Mode Write:  |████████████████████████████████████████| 100.0% (109051904/109051904 bytes)

Metadata

Release files for libiso 0.1.1

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

Source distribution (sdist)

Source distribution for libiso 0.1.1
File Size Uploaded Provenance Actions
libiso-0.1.1.tar.gz 2.5 MB With provenance Details for libiso-0.1.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for libiso 0.1.1
File Actions
libiso-0.1.1-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details for libiso-0.1.1-cp312-abi3-win_amd64.whl
libiso-0.1.1-cp312-abi3-musllinux_1_2_x86_64.whl CPython 3.12 abi3 Linux musl 1.2+ x86-64 Details for libiso-0.1.1-cp312-abi3-musllinux_1_2_x86_64.whl
libiso-0.1.1-cp312-abi3-manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.28+ x86-64 Details for libiso-0.1.1-cp312-abi3-manylinux_2_28_x86_64.whl
libiso-0.1.1-cp312-abi3-manylinux_2_28_aarch64.whl CPython 3.12 abi3 Linux glibc 2.28+ ARM64 Details for libiso-0.1.1-cp312-abi3-manylinux_2_28_aarch64.whl
libiso-0.1.1-cp312-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.12 abi3 macOS 10.12+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64, macOS 10.12+ x86-64 Details for libiso-0.1.1-cp312-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Total release size: 26.7 MB

Release files / libiso-0.1.1.tar.gz

Download URL libiso-0.1.1.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
a34d013404a228862a2089d85b01d683f8bced08ccfe2603222485043ce6be06
BLAKE2b-256 checksum
How to use checksums
021f61d988495747121e32e9714759750e5caabe553702d2162370f86cfd032a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 9, 2026.

Transparency log

Release files / libiso-0.1.1-cp312-abi3-win_amd64.whl

Download URL libiso-0.1.1-cp312-abi3-win_amd64.whl
Size 4.3 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
1560353b0e44fde4c813696412166d13291f671ee434e1152e2f6fb78127017f
BLAKE2b-256 checksum
How to use checksums
162729c3825a0da0e475697f5a95f1bbcb64f50fba93ff3f7beea0f5d20ad74f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 9, 2026.

Transparency log

Release files / libiso-0.1.1-cp312-abi3-musllinux_1_2_x86_64.whl

Download URL libiso-0.1.1-cp312-abi3-musllinux_1_2_x86_64.whl
Size 4.7 MB
Tags CPython 3.12 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
c1aec6417457b2073653332e194cd9f92fe57bc62324fd35be6d1522036acc55
BLAKE2b-256 checksum
How to use checksums
914037542c980de5a3a8b76e3ae675c50043f3255530013b32ee0fd748441b1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 9, 2026.

Transparency log

Release files / libiso-0.1.1-cp312-abi3-manylinux_2_28_x86_64.whl

Download URL libiso-0.1.1-cp312-abi3-manylinux_2_28_x86_64.whl
Size 4.5 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
58ffcaf8c8ef23afdf7dc6685419a052abcd7dfbbcd127cc9d0356e674f8c77e
BLAKE2b-256 checksum
How to use checksums
bb394137d1c308b1ecf07e28c06e1002e5f097ef9d92aab93ee34057a2b7ff9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 9, 2026.

Transparency log

Release files / libiso-0.1.1-cp312-abi3-manylinux_2_28_aarch64.whl

Download URL libiso-0.1.1-cp312-abi3-manylinux_2_28_aarch64.whl
Size 4.4 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
1e9896da28db1fa44ed9a272a89adfdc7874f6947904aff1a988e133c56671e4
BLAKE2b-256 checksum
How to use checksums
0213c94c693ec568150be835bc41c4dac5a9e7c335dffa3a50cb4c14230a7f13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 9, 2026.

Transparency log

Release files / libiso-0.1.1-cp312-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL libiso-0.1.1-cp312-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 6.3 MB
Tags CPython 3.12 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
83f82ee40467df287fa10812ad14abf2c8389d4086736dd8e53b327e5fcf2611
BLAKE2b-256 checksum
How to use checksums
2997a1b602ef08054103bfdd46f94df9918d626e5c196563da889f5aab2590c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 9, 2026.

Transparency log

Security for libiso 0.1.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.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for libiso-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 9, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

6 release files Full provenance

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