
Security News
NVD Quietly Sweeps 100K+ CVEs Into a “Deferred” Black Hole
NVD now marks all pre-2018 CVEs as "Deferred," signaling it will no longer enrich older vulnerabilities, further eroding trust in its data.
blkinfo is a python package to list information about all available or the specified block devices.
blkinfo is a python library to list information about all available or the specified block devices.
It bases on lsblk
command line tool, provided by util-linux
, in addition, it collects information about block
devices, using /sys/block
, /sys/devices
, /proc
directories.
The main goal is to provide Python's binding to lsblk
. Old versions of lsblk
, provided by util-linux-2.23.2
on
Red Hat Enterprise Linux 7 and Centos 7 (and earlier versions) do not contain an option to output to JSON format.
Additional features to lsblk
:
Install python's package from PyPI repository using pip
util (default is Python 3):
pip install blkinfo
pip2 install blkinfo
Install rpm package from Copr (experimental).
dnf copr enable galt/blkinfo
dnf install python2-blkinfo
dnf install python3-blkinfo
Information about all available block devices:
import json
from blkinfo import BlkDiskInfo
myblkd = BlkDiskInfo()
all_my_disks = myblkd.get_disks()
json_output = json.dumps(all_my_disks)
print(json_output)
Passing filters as an argument to the get_disks() method:
import json
from blkinfo import BlkDiskInfo
myblkd = BlkDiskInfo()
filters = {
'tran': 'iscsi'
}
my_filtered_disks = myblkd.get_disks(filters)
json_output = json.dumps(my_filtered_disks)
print(json_output)
blkinfo
library is using lsblk
command line tool directly.
The good idea is to create lsblk
core library in C and just add bindings in Python.
https://github.com/karelzak/util-linux/issues/839NOTE:
If you have got a question or suggestion, please, file an issue on GitHub or submit a PR. https://github.com/grinrag/blkinfo
FAQs
blkinfo is a python package to list information about all available or the specified block devices.
We found that blkinfo demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NVD now marks all pre-2018 CVEs as "Deferred," signaling it will no longer enrich older vulnerabilities, further eroding trust in its data.
Research
Security News
Lazarus-linked threat actors expand their npm malware campaign with new RAT loaders, hex obfuscation, and over 5,600 downloads across 11 packages.
Security News
Safari 18.4 adds support for Iterator Helpers and two other TC39 JavaScript features, bringing full cross-browser coverage to key parts of the ECMAScript spec.