PyDoozerLib

Python library for Doozerd using Python's socket implementation
Download

PyDoozerLib Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • cloudControl Team
  • Publisher web site:
  • https://cloudcontrol.de

PyDoozerLib Tags


PyDoozerLib Description

PyDoozerLib is a Python client for Doozer. This is partly based on Jeff Lindsay's and Neuman Vong's progrium/pydoozer. gevent has been taken out.InstallationInstall via pip: pip install git+ssh://git@github.com/cloudControl/PyDoozerLib.git@0.1.5Installation error with protobuf 2.4.1There is a case when you try to install pydoozerlib via python setup.py install and run into following error:Downloading http://protobuf.googlecode.com/files/protobuf-2.4.1.zipProcessing protobuf-2.4.1.ziperror: Couldn't find a setup script in /tmp/easy_install-riZxUs/protobuf-2.4.1.zipSimply install protobuf via pip manually: pip install protobufThen run python setup.py install again!More informationUsing the pip install git+ssh://... method doesn't seem to run into this issue.For more information check following issue: Protobuf Issue #66UsageUsing PyDoozerLib is dead simple.Establish a connection to a running doozerd node:from pydoozerlib import PyDoozerLibclient = PyDoozerLib(doozerd_host, doozerd_port)client.connect()Get the value at '/watch':print client.get('/watch').valueOverwrite the given value at '/watch' with a new value:client.set('/watch', 'Some random value to be set')Delete a value:rev = client.get('/watch').revclient.delete('/watch', rev)And disconnect:client.disconnect()Also refer to the examples/Example.py file for a thorough example.Hacking on PyDoozerLibMake sure to go through following points if you want to modify PyDoozerLib.Creating protobuf stubIn the < project_root >/protobuf directory you will find a msg.proto file. First, install protobuf, e.g. on Mac: brew install protobufThen, compile the proto file with protoc: protoc --python_output=. msg.protoThis will create a msg_pb2.py which can then be used in your Python project.Product's homepage


PyDoozerLib Related Software