Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #78433

please suggest me best way to learn REST API call with CLI

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 <d.joshi84@gmail.com>
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 <d.joshi84@gmail.com>
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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.14441.1411881727.18130.python-list@python.org> (permalink)
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

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

please suggest me best way to learn REST API call with CLI Unix SA <d.joshi84@gmail.com> - 2014-09-28 11:06 +0545

csiph-web