Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!lightspeed.eweka.nl!lightspeed.eweka.nl!newsfeed.xs4all.nl!newsfeed1a.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.05; 'output': 0.05; 'repository': 0.05; 'intermediate': 0.07; 'oop': 0.09; 'oop,': 0.09; 'url:github': 0.09; 'api': 0.11; 'python': 0.11; 'suggest': 0.14; '.........': 0.16; 'cli': 0.16; 'list"': 0.16; 'subject:API': 0.16; 'module': 0.19; 'basically': 0.19; 'producing': 0.19; 'example': 0.22; 'admin': 0.22; 'subject:please': 0.30; 'message-id:@mail.gmail.com': 0.30; 'produces': 0.31; 'class': 0.32; 'run': 0.32; 'subject:with': 0.35; 'objects': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'similar': 0.36; 'url:org': 0.36; 'list': 0.37; 'skip:& 10': 0.38; 'to:addr:python-list': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'lost': 0.61; 'rpm': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=w94v5tK4o5P9oTjPMyEYn2jQSik1otsawogrd1VB8HY=; b=pSgNT2Hcg0XB/8r7xhTiJJThYjAqKvkos21mKvOvdqiH/NK7SJK3AVwmfiyA0ABR/b urgwwxNknMNSu1RSdprBttjiuhXgwMwqeaYfFbNM9XADFLwa+29DcSVvgApHmf+jvRyg Js2CZozEqvtIwu5PWX+7nbMtnRLj587yxc1nQai5f3Y+SV9qwdY1UAysHl5JsfGX3Cy3 3Tk3cuEZ0JUUn8I0TV6Y6e+ECk1QYv211GK1IHPW/Spb3RqQiTKOUxw/J45X3pLQCkjv xXEY+W0tG1NYgljlKx0IBBnB4NxjDDrOdyCInc48kWFQSbcm3Sv+1c5nJX1+w0+paKLy 64SQ== MIME-Version: 1.0 X-Received: by 10.236.77.138 with SMTP id d10mr561270yhe.120.1411881719716; Sat, 27 Sep 2014 22:21:59 -0700 (PDT) Date: Sun, 28 Sep 2014 11:06:59 +0545 Subject: please suggest me best way to learn REST API call with CLI From: Unix SA To: python-list@python.org Content-Type: multipart/alternative; boundary=90e6ba476d395e6107050419549c X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 59 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1411881727 news.xs4all.nl 2955 [2001:888:2000:d::a6]:50321 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 5659 X-Received-Body-CRC: 303812755 Xref: csiph.com comp.lang.python:78433 --90e6ba476d395e6107050419549c Content-Type: text/plain; charset=UTF-8 Hello, I am intermediate to python and i am familier with OOP, but sometime i lost some where looking at OOP in class and objects .... :( I am looking at https://github.com/pulp/pulp .. basically it uses okaara to generate CLI and calls API. so for example if i run "pulp-admin -u admin -p admin rpm repo list" it produces list of all repositories ... now i want to write similar thing .. but without producing all repository i just want to list single repo and below is the API for that .. http://pulp-dev-guide.readthedocs.org/en/pulp-2.2/integration/rest-api/repo/retrieval.html Not sure what's the best way to write it ... i want to do in OO way.. i know how to use requests/httplib module and generate data and produce output ......... but i am not able to build URL ... can someone help to suggest best way to learn and write it ? Regards, DJ --90e6ba476d395e6107050419549c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,

I am intermediate to py= thon and i am familier with OOP, but sometime i lost some where looking at = OOP in class and objects .... :(

I am l= ooking at https://github.com/pulp/= pulp ..

basicall= y it uses okaara to generate CLI and calls API.


so for example if i run "pulp-admin -u= admin -p admin rpm repo list" it produces list of all repositories ..= .

now i want to writ= e similar thing .. but without producing all repository i just want to list= single repo and below is the API for that ..

http://pulp-dev-guide.readthedocs.org/en/pulp-2.2/integration/rest-ap= i/repo/retrieval.html

= Not sure what's the best way to write it ... i want to do in OO w= ay.. i know how to use requests/httplib module and generate data and produc= e output .........

but i am not able to build URL ...

can so= meone help to suggest best way to learn and write it ?

Regards,
DJ


--90e6ba476d395e6107050419549c--