[pacman-dev] Python 3 bindings for libalpm
remyoudompheng at gmail.com
Sat Mar 26 18:23:03 EDT 2011
I have used the code started by Imanol Celaya (at
http://github.com/ornitorrincos/pyalpm/) to start my own version of
Python bindings for libalpm.
It is written for Python 3 using the pacman 3.5 API, with a bit of
object-oriented choices, but trying to stay closest to the libalpm
You can find it at
It currently implements three classes : DB, Package and Options, and
none of them can be instantiated by the user.
* DB objects are gotten by pyalpm.get_localdb() or
pyalpm.get_syncdb(name), pyalpm.get_syncdbs() functions.
* Package objects are gotten by the db.get_pkg(name) or
* Options objects are actually a singleton (pyalpm.options) whose
attributes control the various libalpm options.
See the example scripts in tests/ to know more about the available
interface. You can also use pydoc on the compiled library to have an
idea of the available methods.
More information about the pacman-dev