Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

nanoservice is a small Python library for writing lightweight networked services using nanomsg

Project Description

nanoservice is a small Python library for writing lightweight networked services using nanomsg

With nanoservice you can break up monolithic applications into small, specialized services which communicate with each other.

Install

  1. Make sure you have the nanomsg library installed:
$ git clone git@github.com:nanomsg/nanomsg.git
$ ./configure
$ make
$ make check
$ sudo make install

For more details visit the official nanomsg repo

On OS X you can also do:

$ brew install nanomsg
  1. Install nanoservice:

From project directory

$ make install

Or via pip

$ pip install nanoservice (it's broken)

Example Usage

The service:

from nanoservice import Responder

def echo(msg):
    return msg

s = Responder('ipc:///tmp/service.sock')
s.register('echo', echo)
s.start()
$ python echo_service.py

The client:

from nanoservice import Requester

c = Requester('ipc:///tmp/service.sock')
res, err = c.call('echo', 'hello world’)
print('Result is {}'.format(res))
$ python my_client.py
$ Result is: hello world

Other

To run tests:

$ make test

To run benchmarks

$ make bench

Check out examples directory for more examples.

MIT Licensed

Release History

This version
History Node

0.7.2

History Node

0.6.0

History Node

0.5.3

History Node

0.5.2

History Node

0.5.0

History Node

0.4.1

History Node

0.3.1

History Node

0.3.0

History Node

0.2.2

History Node

0.2.1

History Node

0.2.0

History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.2

Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
nanoservice-0.7.2.tar.gz
(10.4 kB) Copy SHA256 Hash SHA256
Source None Dec 21, 2015

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting