--- id: blkinfo version: "0.2.0" license: GPLv3 license_treatment: copyleft maintenance: abandoned --- # blkinfo — blkinfo is a python package to list information about all available or the specified block devices. License: copyleft · Maintenance: abandoned · Downloads: 175.4K/mo ## What it is and what it does blkinfo is a Python library that gathers information about block devices (disks, partitions, etc.) on a Linux system. It wraps the lsblk command-line tool and supplements it by reading directly from /sys/block, /sys/devices, and /proc to collect device metadata, usage statistics, and iSCSI target details. The library was originally created to provide JSON output on older Red Hat Enterprise Linux and CentOS systems where lsblk lacked that capability. You instantiate a BlkDiskInfo object and call get_disks() to retrieve all available block devices as structured data, optionally passing filters to narrow results by device name, size, transport type, mount status, or other attributes. The main use case is programmatic inventory of storage devices in system administration or infrastructure automation scripts. Use it for: - Inventory block devices in system administration scripts without parsing lsblk text output. - Filter and discover iSCSI-attached storage targets by IP address and port number. - Collect block device usage statistics and metadata for monitoring or reporting. - Enumerate mounted partitions and their parent devices in automated provisioning workflows. - Build storage device catalogs on systems with older lsblk versions lacking JSON support. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Retrieves structured information about block devices on a system by wrapping lsblk and reading from /sys/block, /sys/devices, and /proc, with support for filtering and iSCSI metadata. No. The package is abandoned (no updates since 2021-10-06, last commit 2023-08-06) and carries a copyleft GPLv3 license that restricts use in proprietary software. Modern Linux systems have lsblk with JSON output built-in. Install only if locked to an old Red Hat/CentOS system with no other option and your project is open-source. ## Install pip install blkinfo uv add blkinfo poetry add blkinfo ## Installing blkinfo Before you install: High install friction: the package is abandoned (last commit 2023-08-06, latest release 2021-10-06) and has not been maintained for an extended period. No runtime dependencies, but depends on lsblk and /proc filesystem access, which may not be portable across all environments. License in practice: GPLv3 copyleft license means any code that links or distributes this package must also be open-source under compatible terms. Proprietary or closed-source projects should avoid this dependency. Quickstart: from blkinfo import BlkDiskInfo import json myblkd = BlkDiskInfo() all_disks = myblkd.get_disks() print(json.dumps(all_disks)) Requires lsblk command-line tool (util-linux package) and read access to /sys/block, /sys/devices, and /proc filesystems; Linux-only. Verify before relying: - Whether the package works with modern Linux kernel versions and recent util-linux releases. - Compatibility with Python versions beyond those tested at release (2021-10-06). - Whether iSCSI target discovery features still function with current iSCSI implementations. ## Package facts - License: GPLv3 (copyleft) - Python support: unspecified - Install friction: high - Maintenance: abandoned - Downloads: 175.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags block device information python, lsblk python wrapper, disk device enumeration, storage device metadata, iscsi target discovery, block device filtering, system disk inventory, linux-only, abandoned, copyleft [View on SkillFed](https://skillfed.io/packages/blkinfo) · [View on PyPI](https://pypi.org/project/blkinfo/)