Designing a RESTful API with Python and Flask

In recent years REST (REpresentational State Transfer) has emerged as the standard architectural design for web services and web APIs. In this article I'm going to show you how easy it is to create a RESTful web service using Pythonand the Flask microframework. What is REST? The characteristics of a REST system are defined by six design rules: Client-Server: There … Continue reading Designing a RESTful API with Python and Flask

Sql query in Odoo model

@api.multi def get_all_so(self, name=None): sql = "select * from sale_order where name like '%s%' order by name desc;" % name self.env.cr.execute(sql) res_all = self.env.cr.fetchall() #fetchall() will return an array of dictionaries return res_all @api.multi def get_so(self, name=None): sql = "select * from sale_order where name like '%s' order by name desc;" % name self.env.cr.execute(sql) #fetchone() … Continue reading Sql query in Odoo model

Welcome to My New Blog

Be yourself; Everyone else is already taken. — Oscar Wilde. This is the first post on my new blog. I’m just getting this new blog going, so stay tuned for more. Subscribe below to get notified when I post new updates.