# nnpy
**Repository Path**: T1anzhEnyu/nanomsg_nnpy
## Basic Information
- **Project Name**: nnpy
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-04-11
- **Last Updated**: 2021-04-11
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
nnpy: cffi-based Python bindings for nanomsg
============================================
Is what it says on the tin. Stay tuned for more. Dependencies:
- Python 2.7 or 3.4
- cffi (http://cffi.readthedocs.org/en/latest/) and its dependencies
- nanomsg (tested with 1.0)
How to install
--------------
The usual should work:
.. code-block:: shell
$ sudo pip install nnpy
Getting started
---------------
.. code-block:: python
import nnpy
pub = nnpy.Socket(nnpy.AF_SP, nnpy.PUB)
pub.bind('inproc://foo')
sub = nnpy.Socket(nnpy.AF_SP, nnpy.SUB)
sub.connect('inproc://foo')
sub.setsockopt(nnpy.SUB, nnpy.SUB_SUBSCRIBE, '')
pub.send('hello, world')
print(sub.recv())
Related Projects
----------------
- `nanomsg `_
- `aionn `_ - asyncio messaging library based on nnpy