Creating the User Service

In the last chapter, we simply had two services in the same module, which is fine for any small-scale project. However, now that our platform is starting to grow and new roles are being defined between services, let's start to split these out by keeping them in different modules. Alongside your, create a new file,

Add the following code:

from nameko.rpc import rpc 
from .dependencies.users import UserStore 
class UserService: 
    name = 'user_service' 
    user_store = UserStore() 
    def create_user(self, first_name, last_name, email, password): 

If you read the last chapter, then there is nothing ...

Get Python Programming Blueprints now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.