Registry / web-framework / nameko

nameko

JSON →
library2.14.1pypypi✓ verified 84d ago

A microservices framework for Python that lets service developers concentrate on application logic and encourages testability. Current stable release is 2.14.1, with a release candidate for 3.0.0 available. Release cadence is irregular, with major updates every few years.

pip install nameko
INSTALL
IMPORT
SIG · NAMEKO
N
nameko
web-frameworkpythonv2.14.1
Install
4.5s avg
Import
959ms
Disk
41MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.14.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 1.000s · 43.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.5s · import 0.918s · 41MB
41MB installed
● package 41MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ServiceBase
from nameko.rpc import rpc
Nameko uses decorators, not base classes. Use @rpc on methods.
nameko run
from nameko.cli.main import main
from nameko.runner import run
In v2.x, use nameko CLI command. For programmatic usage, use ServiceRunner.

Define a simple RPC service and run it using the nameko CLI.

from nameko.rpc import rpc from nameko.standalone.rpc import ServiceRpcProxy class GreetingService: name = 'greeting_service' @rpc def hello(self, name): return f'Hello, {name}!' if __name__ == '__main__': from nameko.runners import ServiceRunner from nameko.containers import ServiceContainer from nameko.cli.main import run # Run with: nameko run service:GreetingService print('Run with: nameko run <module>:GreetingService')
nameko --version
Debug
Known issues
breakingIn v2.x, nameko automatically patches eventlet. In v3.x, this is removed and must be done manually.
fix
If upgrading to v3.x, ensure your code does not rely on automatic monkey-patching. Import eventlet and call eventlet.monkey_patch() if needed.
affects: <3.0.0 vs >=3.0.0-rc9
gotchaAsync RPC calls: using ServiceRpcProxy in an async context can cause deadlocks if not handled correctly.
fix
Use ServiceRpcProxy in synchronous code only, or use nameko's async extensions if available.
affects: all
deprecatednameko backdoor command was removed in v3.0.0-rc7.
fix
Use alternative debugging methods such as pdb or remote debugging.
affects: >=3.0.0-rc7
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'nameko'
Nameko not installed or running in wrong environment.
fix
pip install nameko
pika.exceptions.AMQPConnectionError: Connection closed by remote server
RabbitMQ not running or unreachable.
fix
Ensure RabbitMQ is running and accessible. Check AMQP_URI config.
AttributeError: module 'nameko' has no attribute 'rpc'
Incorrect import path. Use 'from nameko.rpc import rpc'.
fix
Correct import: from nameko.rpc import rpc
Upgrade
Version history
2.14.1latest on PyPI · released Dec 5, 2021
Audit
Dependencies
eventletoptionalNameko v2.x automatically monkey-patches with eventlet. In v3.x, this is opt-in.
rabbitmqrequiredRequired as an external messaging broker for RPC and events.
Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources
nameko — pip install nameko · libregistry