[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Re: Most "pythonic" syntax to use for an API client library
From:       Albert-Jan Roskam <sjeik_appie () hotmail ! com>
Date:       2019-04-29 6:22:34
Message-ID: VI1PR07MB4941902E45B76146BBA695C583390 () VI1PR07MB4941 ! eurprd07 ! prod ! outlook ! com
[Download RAW message or body]



On 29 Apr 2019 07:18, DL Neil <PythonList@DancesWithMice.info> wrote:

On 29/04/19 4:52 PM, Chris Angelico wrote:
> On Mon, Apr 29, 2019 at 2:43 PM DL Neil <PythonList@danceswithmice.info> wrote:
> > 
> > On 29/04/19 3:55 PM, Chris Angelico wrote:
> > > On Mon, Apr 29, 2019 at 1:43 PM DL Neil <PythonList@danceswithmice.info> wrote:
> > > > Well, seeing you ask: a more HTTP-ish approach *might* be:
> > > > 
> > > > api.update.customer( 1, name='Bob' )
> > > > 
> > > > ie
> > > > api.verb.subject( adjectives and adverbs )
> > > > 
> > > > Thus:
> > > > api_label/intro/ID.what_we're_going_to_do.who/what_we'll_do_it_to(
> > > > customerID, support_data)
> > > > 
> > > > Yet, it doesn't really *look right* does it?
> > > > (and someone might complain about mixing the 'different' variable-values...)
> > > > 
> > > 
> > > The point here is not to make an HTTP-like interface, but a
> > > Python-like interface :)
> > 

I recently used Python properties (getter, setter, deleter) for GET, POST/PUT, \
DELETE, respectively. I didn't need any other http methods.


-- 
https://mail.python.org/mailman/listinfo/python-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic