[nanomsg] Alpha Python bindings.

  • From: Tony Simpson <agjasimpson@xxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Tue, 27 Aug 2013 22:22:39 +0100

Hi All,

I've done some work on a python binding to nanomsg.

https://github.com/tonysimpson/nanomsg-python

I consider it experimental at the moment but I think its already a viable
option for CPython 2.6+ or 3.2+

My plan is to write very low level wrappers as close to the C API as
possible then build a more "pythonic" wrapper on top of that. My assumption
is this will allows for the widest audience, those who want to minimise
function calls and use zero-copy can use the low-level api and those who
want a simpler more pythonic api can use the high-level API.

The high-level api will be pure Python which should make it easier to
maintain and the low-level api will be kept simple and close to the C API
and will have different implementations for different Python interpreters
(I'm focusing on CPython and Pypy for now).

Currently only the low-level api is present and implemented for CPython, I
have tested it on 2.7 and 3.2 on Linux and 2.7 on windows but only manually
via IPython. User kubo39 on github sent me some patches which add a test
which is great and I intend to add more.

I'd appreciate feedback and suggestions on the code and design.

Also if anyone is work on on similar Python or Ruby wrappers I'd like to
discuss ideas around the higher level api.

Cheers,

Tony

Other related posts: