A complete Python client for the Kodi JSON-RPC API. Supposedly self-configuring so it always uses the stable version for the Kodi box you're contacting. Does all the heavy lifting for you. Even self-documenting: By print'ing your connection instance you can get a list of all of the operations you can carry out.
I think I could use this to make the Kodi bot self-configuring to a certain extent by checking to see what functions were available and adding or removing them from the bot's online docs, as well as frobbing flags to allow or disallow those commands.
Supports password authentication to Kodi instances, too.