Skip to main content

libdiscid Python bindings

python-libdiscid implements Python >= 3.11 bindings for libdiscid using Cython.

Dependencies

  • libdiscid
  • Cython (>= 3, optional)
  • pkgconfig (optional)

Note that the tarballs come with pre-built C source for the Cython module. So Cython is only required if one builds python-libdiscid from the git repository or if one wants to change anything in the Cython module.

If pkgconfig is installed, setup.py uses libdiscid's pkg-config information to set include directories, libraries to link, etc.

Quick installation guide

python-libdiscid is available in some distributions:

  • Debian/Ubuntu: apt-get install python3-libdiscid (Python 3)
  • Fedora: dnf install python3-libdiscid (Python 3)

python-libdiscid can be installed via pip:

$ pip install python-libdiscid

or by running:

$ python3 setup.py install

If you just want to try it locally, run:

$ python3 setup.py build_ext -i

and hack right away. You can also run:

$ python3 setup.py build

but please make sure that build/lib.* is in sys.path before the source folder.

It is also avalaible on conda-forge:

$ conda install python-libdiscid -c conda-forge

or

$ mamba install python-libdiscid -c conda-forge

A note for Windows users

There are eggs available from PyPI that don't require the extension module to be built. If these are used, it is still required to drop a working discid.dll in C:\WINDOWS\system32 (or wherever it can be found).

Installing the package through conda-forge for Windows 64-Bit will automatically download and install the library.

Usage

from libdiscid import read

disc = read("/dev/cdrom")
print("id: {}".format(disc.id))

License

python-libdiscid is released under the MIT license. Check LICENSE for details.

Download files

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

Source Distribution

python_libdiscid-2.1.tar.gz (20.5 kB view details)

Uploaded Source

File details

Details for the file python_libdiscid-2.1.tar.gz.

File metadata

  • Download URL: python_libdiscid-2.1.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for python_libdiscid-2.1.tar.gz
Algorithm Hash digest
SHA256 a2d0a7773c2daf5b3d4727d84a5c7f6de9ecb5a9c1a9d53d667c20a76c0a6769
MD5 ea23807434523c2b8042673b0973d14a
BLAKE2b-256 4e73dd563fbc94985290d3067e7ee64582ed10a5ea9d43afcddf19f144f1116e

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 Sentry Error logging StatusPage Status page