Skip to main content

Protobuf Python modules for machinetalk

Project description


Protobuf declarations for machinekit messages

This repo is integrated into as a git subtree.

To change/add to message definitions:

  • send a PR against this repo
  • add a new remote in your machinekit repo referring to here
  • update the subtree in your machinekit repo like so
git remote add machinetalk-protobuf git://
git fetch machinetalk-protobuf
git subtree merge --prefix=src/machinetalk/proto machinetalk-protobuf/master --squash

Now create a PR against the machinekit repo.


Installation via PyPi

To use the Machinetalk protobuf Python modules in your projects, use:

pip install machinetalk-protobuf

Installation from source

Alternatively you can install the Python modules directly from the source code.

python build
sudo python install


See examples.

JavaScript (NPM/NodeJS)


To use machinetalk protobuf definitions in your npm-based projects, use:

npm install --save machinetalk-protobuf


See examples. If you want to try these examples, be sure to first run npm install in this repository.


var machinetalkProtobuf = require('machinetalk-protobuf');
var messageContainer = {
  type: machinetalkProtobuf.message.ContainerType.MT_PING
var encodedMessageContainer = machinetalkProtobuf.message.Container.encode(messageContainer);

This results in a buffer that starts with 0x08 0xd2 0x01.


var machinetalkProtobuf = require('machinetalk-protobuf');
var encodedBuffer = new Buffer([0x08, 0xd2, 0x01]);
var decodedMessageContainer = machinetalkProtobuf.message.Container.decode(encodedBuffer);

This results in a messageContainer like the one defined in Encoding.

JavaScript (Browser)

CDN usage

<script src="//"></script>

With VERSION replaced by a valid tag or just master for testing the latest master build.


var messageContainer = {
  type: machinetalk.protobuf.message.ContainerType.MT_PING
var encodedMessageContainer = machinetalk.protobuf.message.Container.encode(messageContainer);

This results in a buffer that starts with 0x08 0xd2 0x01.


var encodedBuffer = new ArrayBuffer([0x08, 0xd2, 0x01]);
var decodedMessageContainer = machinetalk.protobuf.message.Container.decode(encodedBuffer);

This results in a messageContainer like the one defined in Encoding.

Project details

Download files

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

Built Distribution

machinetalk_protobuf-1.1.5-py2.py3-none-any.whl (80.5 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page