[pacman-dev] Python 3 bindings for libalpm
Rémy Oudompheng
remyoudompheng at gmail.com
Sat Mar 26 18:23:03 EDT 2011
Hello people,
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
API.
You can find it at
git://projects.archlinux.org/users/remy/pyalpm.git/
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
db.get_pkgcache() methods.
* 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.
Regards,
Rémy.
More information about the pacman-dev
mailing list