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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.