In this recipe, we will learn how to invoke a custom method of the model through JSON-RPC. We will change the status of the book by calling the make_available() method.
Calling methods through JSON-RPC
Getting ready
We will create the Python program to call make_available on the library.book model. Make sure you have installed the my_library module and the server is running on http://localhost:8069.
How to do it...
Perform the following steps to create, write, and update a book's information through RPC:
- Add the jsonrpc_method.py file. You can place this file anywhere...