Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'api.': 0.04; 'subject:Python': 0.05; 'bits': 0.07; 'subject:How': 0.09; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'cc:addr:python-list': 0.10; 'url:blog': 0.10; 'python': 0.11; 'instead.': 0.15; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'helps.': 0.16; 'index.': 0.16; 'message-id:@fido.openend.se': 0.16; 'proceed?': 0.16; 'received:89.233': 0.16; 'received:89.233.217': 0.16; 'received:89.233.217.133': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'subject:may': 0.16; 'laura': 0.18; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; 'subject:Code': 0.22; 'cc:no real name:2**0': 0.23; 'code.': 0.23; 'bit': 0.23; '2015': 0.23; 'module': 0.23; 'wrote': 0.23; 'insert': 0.23; 'tried': 0.24; 'header:In-Reply-To:1': 0.24; 'idea': 0.26; 'not,': 0.27; 'updating': 0.27; "doesn't": 0.28; 'looks': 0.29; '-0700,': 0.29; 'received:se': 0.29; 'work.': 0.30; 'fri,': 0.31; 'code': 0.31; 'run': 0.32; 'posting': 0.32; 'probably': 0.32; 'getting': 0.33; 'problem': 0.33; 'but': 0.36; 'there': 0.36; 'modules': 0.36; 'two': 0.37; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'data': 0.40; 'where': 0.40; 'subject:with': 0.40; 'some': 0.40; 'learn': 0.60; 'here.': 0.61; 'provide': 0.61; 'header:Message- Id:1': 0.62; 'kindly': 0.64; 'email addr:gmail.com': 0.64; 'group,': 0.65; 'here': 0.66; 'wish': 0.72; 'training': 0.78; 'received:89': 0.80; '>if': 0.84; 'obvious.': 0.84; 'esteemed': 0.91 To: subhabrata.banerji@gmail.com cc: python-list@python.org From: Laura Creighton Subject: Re: How may I Integrate Python Code with REST In-Reply-To: Message from subhabrata.banerji@gmail.com of "Fri, 12 Jun 2015 10:52:19 -0700." <02f1571f-a497-4b21-99b5-b39a627bb5ea@googlegroups.com> References: <02f1571f-a497-4b21-99b5-b39a627bb5ea@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25958.1434141999.1@fido> Content-Transfer-Encoding: quoted-printable Date: Fri, 12 Jun 2015 22:46:39 +0200 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [89.233.217.130]); Fri, 12 Jun 2015 22:46:41 +0200 (CEST) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 41 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1434142009 news.xs4all.nl 2845 [2001:888:2000:d::a6]:33499 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:92554 In a message of Fri, 12 Jun 2015 10:52:19 -0700, subhabrata.banerji@gmail.= com w rites: >Dear Group, > >I wrote a Python code. In the code there are two modules where we may ins= ert data from outside. They are updating some training module and updating= index. As a standalone code this is working fine. = > >I need to port this code to REST. I tried to learn Flask. My Practice for= Flask is okay. I can put,get,delete. = > >But how may I proceed I am not getting much idea. I bit new in REST. = >If any one of the esteemed members may kindly provide an idea how may I p= roceed? = > >Regards, >Subhabrata Banerjee. = All you need now is post. So it looks as if you have all the bits you need, but you don't know how to use them to design an API. See if this helps. http://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-an= d-flask If not, you are probably at the stage of posting code here. Here is my code that doesn't work. Here is what happens when I run it. This is what I wish it would do instead. Right now we don't understand what it is that you don't understand, alas. Code makes the problem obvious. Laura