• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

nnpy/H09-Feb-2018-292251

nnpy.egg-info/H03-May-2022-6347

.gitignoreH A D24-Sep-201671 97

LICENSEH A D05-Mar-20161,023 1815

MANIFEST.inH A D05-Mar-201620 21

PKG-INFOH A D09-Feb-20182 KiB6347

README.rstH A D09-Feb-2018871 4126

generate.pyH A D03-May-20223.2 KiB12485

setup.cfgH A D09-Feb-201838 53

setup.pyH A D09-Feb-20181,010 3028

README.rst

1nnpy: cffi-based Python bindings for nanomsg
2============================================
3
4Is what it says on the tin. Stay tuned for more. Dependencies:
5
6- Python 2.7 or 3.4
7- cffi (http://cffi.readthedocs.org/en/latest/) and its dependencies
8- nanomsg (tested with 1.0)
9
10How to install
11--------------
12
13The usual should work:
14
15.. code-block:: shell
16
17   $ sudo pip install nnpy
18
19Getting started
20---------------
21
22.. code-block:: python
23
24   import nnpy
25
26   pub = nnpy.Socket(nnpy.AF_SP, nnpy.PUB)
27   pub.bind('inproc://foo')
28
29   sub = nnpy.Socket(nnpy.AF_SP, nnpy.SUB)
30   sub.connect('inproc://foo')
31   sub.setsockopt(nnpy.SUB, nnpy.SUB_SUBSCRIBE, '')
32
33   pub.send('hello, world')
34   print(sub.recv())
35
36Related Projects
37----------------
38
39- `nanomsg <http://nanomsg.org/>`_
40- `aionn <https://github.com/wrobell/aionn>`_ - asyncio messaging library based on nnpy
41