Skip to main content

Python SCSI generic library

Project description

py_sg

Description

This is a small Python extension which sends arbitrary commands to SCSI devices, via the Linux SCSI Generic driver, which provides the SG_IO ioctl for this purpose.

Basically, the module includes two methods, read and write, which allow you to issue commands to SCSI devices and read and write accompanying data. If an OS error occurs, the OSError exception will be raised, while if a SCSI error occurs, the py_sg.SCSIError exception will be raised.

PyPI install

sudo python3 -m pip install py_sg

Manual install

  1. Install dependencies:

    sudo apt install python3-dev
    
  2. Clone this repo

  3. Enter the folder

  4. Try to compile:

    python3 setup.py build
    
  5. If .so library is compiled, install:

    sudo python3 -m pip install <path/to/setup.py>
    
  6. You are done

Precompiled package

https://pypi.org/project/py-sg/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_sg-0.17.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_sg-0.17-cp314-cp314-musllinux_1_2_x86_64.whl (29.2 kB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

File details

Details for the file py_sg-0.17.tar.gz.

File metadata

  • Download URL: py_sg-0.17.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for py_sg-0.17.tar.gz
Algorithm Hash digest
SHA256 8f6756b48d350514c80cd5d13e14cde8fe139386009d9cb6e702324391d6993c
MD5 46fe182b0ddb45ea0c3afe6def0e8b15
BLAKE2b-256 0f09c84b74d53a1a8a240deac22ef171af9127e9c44df7268f94c85bff0cfe61

See more details on using hashes here.

File details

Details for the file py_sg-0.17-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

  • Download URL: py_sg-0.17-cp314-cp314-musllinux_1_2_x86_64.whl
  • Upload date:
  • Size: 29.2 kB
  • Tags: CPython 3.14, musllinux: musl 1.2+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for py_sg-0.17-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 740ec5a9ce22259f1fb54fa58d4c1cb90257f6a15d1032129809a8c650a1c890
MD5 394f012f8d9e5f1649cc08142606900e
BLAKE2b-256 219706956b46c4b65e01c42df8982377883ce31cfea28b4bf000170c1c140229

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page