Nameko


A microservice framework for Python.

Focus on business logic

Write regular Python methods and classes to implement your service. Nameko will manage connections, transports and concurrency for you.

Distributed and scalable

Spin up multiple service instances to easily scale out. Nameko gives you effortless concurrency by yielding workers when they wait for I/O, leaving you free to handle many requests without the worry of threading.

Extensible

Nameko is compatible with almost any protocol, transport or database. Simply use the built-in extensions, build your own or leverage the community.

Nameko includes an implementation of RPC over AMQP. It comprises the @rpc entrypoint, a proxy for services to talk to other services, and a standalone proxy that non-Nameko clients can use to make RPC calls to a cluster


from nameko.rpc import rpc, RpcProxy class ServiceY: name = "service_y"  @rpc
 def append_identifier(self, value): return u"{}-y".format(value) class ServiceX: name = "service_x" y = RpcProxy("service_y")  @rpc
 def remote_method(self, value): res = u"{}-x".format(value) return self.y.append_identifier(res)

The HTTP entrypoint is built on top of werkzeug, and supports all the standard HTTP methods (GET/POST/DELETE/PUT etc)


import json
from nameko.web.handlers import http class HttpService: name = "http_service"  @http('GET', '/get/<int:value>')
 def get_method(self, request, value): return json.dumps({'value': value})  @http('POST', '/post')
 def do_post(self, request): return u"received: {}".format(request.get_data(as_text=True))

The easiest way to install Nameko is from PyPI, using pip

To read the detailed installation instructions, see our documentation

Discourse

Questions & Support

Twitter

News & Announcements

Gitter

Real-time Chat

Github

Issues & Pull Requests

Github

Issues & Pull Requests

Discourse

Questions & Support

Twitter

News & Announcements

Gitter

Real-time Chat

Github

Issues & Pull Requests

Discourse

Questions & Support

Twitter

News & Announcements

Gitter

Real-time Chat

Github

Issues & Pull Requests

Sends exception info to Sentry

Send and receive messages from Slack

Django wrapper for Nameko

Retry delivery of messages

Retry delivery of messages

Sends exception info to Sentry

Send and receive messages from Slack

Django wrapper for Nameko

Retry delivery of messages

Sends exception info to Sentry

Send and receive messages from Slack

Django wrapper for Nameko

Retry delivery of messages

Bottom line, if you are considering microservices, Nameko will save you time and energy

-- Conor Seabrook@sideboltconor

I really love the API, it's kind of brilliant

-- Alexander Goldberg@ayoshi

Probably the best Open Source solution for this problem in the Python world so far

-- Armin Ronacher@mitsuhiko

Bottom line, if you are considering microservices, Nameko will save you time and energy

-- Conor Seabrook@sideboltconor

I really love the API, it's kind of brilliant

-- Alexander Goldberg@ayoshi

Probably the best Open Source solution for this problem in the Python world so far

-- Armin Ronacher@mitsuhiko

Bottom line, if you are considering microservices, Nameko will save you time and energy

-- Conor Seabrook@sideboltconor

I really love the API, it's kind of brilliant

-- Alexander Goldberg@ayoshi

A team effort - designed by Andreea Hrincu and built by Kyle Stewart