Questions tagged [nameko]

Python framework for building microservices

Python framework for building microservices

55 questions
1
vote
0 answers

Nameko - Cannot find reference 'config' in '__init__.py'

I'm setting up the integration tests in Nameko wity pyTest . in my conftest.py I added the following fixture @pytest.fixture def test_config(rabbit_config, db_url): with config.patch({'DB_URIS': {'service:Base': db_url}}): yield But I…
Smaillns
  • 2,540
  • 1
  • 28
  • 40
1
vote
1 answer

Can't invoke nameko shell within Docker container

I'm invoking nameko shell inside my docker container of the example service, but I receive this error. I have setup two containers. My rabbitmq container and my service container. I'm invoking the nameko shell from inside the service container bash.…
1
vote
1 answer

Python, Nameko, nameko-sqlalchemy : Error : db_uris = self.container.config[DB_URIS_KEY] KeyError: 'DB_URIS'

Hi everyone, First of all, I want to let you know that I am just beginning to learn about the python micro service library Nameko. I am trying to create a simple micro service that add a user in Sqlite database using nameko-sqlalchemy extention.…
myones
  • 31
  • 5
1
vote
1 answer

How to deploy a nameko microservice

I've been reading through the nameko docs, and it is all good and clear, except for one part. How do you actually deploy your nameko microservice? I mean, it is clear how we deploy RESTful APIs in flask_restful, for instance. But with nameko? If two…
Ian Gabaraev
  • 101
  • 1
  • 8
1
vote
1 answer

Proper way to run nameko service(s) inside a Django application?

If I have a vanilla Django REST (DRF) application and I would like to integrate a nameko service (specifically an event_handler event listening service), what's the best way to achieve this? I cannot simply nameko run a service if it's part of a…
sivabudh
  • 31,807
  • 63
  • 162
  • 228
1
vote
1 answer

Implementing (Abstract) Nameko Service Inheritance

I have a nameko service that deals with lots of entities, and having the entrypoints in a single service.py module would render the module highly unreadable and harder to maintain. So I've decided to split up the module in to multiple Services which…
Rodgers Ouma
  • 103
  • 2
  • 13
1
vote
1 answer

How to use Config in dependency provider in Nameko?

In Nameko we can use Config dependency provider to read config from a yaml file: class SampleService: name = "sample" config = Config() @rpc def get(self, user_id): # I can access self.config here return {'user_id':…
Alireza
  • 6,497
  • 13
  • 59
  • 132
1
vote
1 answer

How to communicate binary data in nameko rpc?

It seems json is the default way for serialization data in nameko rpc. If I call rpc.my_service.send(b'\x01\'), it will raise exception kombu.exceptions.EncodeError: Object of type 'bytes' is not JSON serializable Is there a way to send binary data…
ShenLei
  • 567
  • 1
  • 5
  • 17
1
vote
1 answer

How to auto-generate documents of rpc interface of nameko microservice?

I see some examples about nameko RESTful microservice + swagger which can generate amazing interface document. However, in my case, I only use RPC rather than HTTP. Is there any swagger-like library for documenting RPC interface?
ShenLei
  • 567
  • 1
  • 5
  • 17
1
vote
1 answer

BlockingIOError when testing the nameko basic example

When trying the very basic example about the python framework nameko, I get an error like this one : BlockingIOError: [WinError 10035] A non-blocking socket operation could not be completed immediately Any idea where it can come from ? I am using…
gl393
  • 311
  • 3
  • 14
1
vote
1 answer

How can I pass a nameko dependency to an SqlAlchemy event handler?

I'm writing a small RPC service that allows remote CRUD of a database, using nameko and sqlalchemy. For some methods/properties/event handlers, my models require to fetch some data using a dependency. The way I'd like it to work, whenever I call one…
1
vote
1 answer

Python & Nameko - GreenSSLSocket does not have a public constructor. Instances are returned by SSLContext.wrap_socket().

I've created a nameko service that sends a text message to the provided phone number. Using the Africas Talking API. The service runs successfully but once you use the nameko shell it doesn't work. However the phone number is successfully passed…
1
vote
2 answers

No route between Nameko and Flask

if you saw my last question one hour ago or almost) ! I managed to resolve a lot of problems but I'm stuck with one and I can't understand why I have it. I prefer to make a new thread because the error isn't the same and for future readers, it will…
Oyo
  • 47
  • 8
1
vote
2 answers

python3 nameko RPC server with mysql connection

I try to use a nameko rpc server to read data from mysql. here is the server code. class SendService: name = 'url_feature_rpc_service' def __init__(self): print('new connection') self.db = MySQLdb.connect(host="localhost",…
Yaozong Li
  • 37
  • 6
1
vote
2 answers

Nameko - invoking RPC method from another service

I am trying to understand how nameko works for basic RPC. I am looking to define microservices in separate files and being able to run them from command shell. With this structure service2 is not being able to invoke service1's RPC method. What is…
M.E.
  • 4,955
  • 4
  • 49
  • 128