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


Groups > comp.lang.python > #30360

REST code-golf: How concisely can you expose and consume services?

Path csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <alec.taylor6@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.042
X-Spam-Evidence '*H*': 0.92; '*S*': 0.00; 'subject:code': 0.07; 'subject:How': 0.09; 'imported': 0.09; 'imports': 0.09; 'url:github': 0.09; 'count,': 0.16; 'luck!': 0.16; 'models,': 0.16; 'received:209.85.214.174': 0.21; 'libraries': 0.22; 'modifying': 0.22; 'example': 0.23; 'message-id:@mail.gmail.com': 0.27; 'remains': 0.29; 'code': 0.31; 'comments': 0.33; 'to:addr :python-list': 0.33; "can't": 0.34; 'received:google.com': 0.34; 'subject:?': 0.35; 'received:209.85': 0.35; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'subject:-': 0.40; 'header:Received:5': 0.40; 'free': 0.61; 'reply': 0.66; 'url:master': 0.84; 'subject:you': 0.88; 'controller': 0.91; 'subject:services': 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=WQwTlMMrZ8DdoKSuJ9XAhoKgsQmXxPBVLNCKx1OsCtw=; b=LW4M8B1TnncIsslciYF3kcPnS8Qrg0GjAyRkaJv3b37OlmgzlRk75yuwRs9EJM39HB JYQKonUCmx8aAhsF7NW+wIferTIuKy50drvv/N75//DVyRKUjaF3CjrZb1g1at5FwK+l 1w6VGQjIbTf9mtw8baqc6zuQzbZIvzFvL9KIRQtEHGveWJdXoVc6sErX9EknQYU2WwlV DZS9wJaYfWGFR6AiI2vYO9A0agpBbFj/xNMl2TN4+Gi/9unXeV4pnRN3c5tCz9ocELnH XJsjIA+vGih1QsGxRR8ZAGu6zLqhlwou+qb+uup/pNoDn+udzwXqtMblP3++J3NJbkzK uhPQ==
MIME-Version 1.0
Date Fri, 28 Sep 2012 15:41:32 +1000
Subject REST code-golf: How concisely can you expose and consume services?
From Alec Taylor <alec.taylor6@gmail.com>
To "comp.lang.python" <python-list@python.org>
Content-Type text/plain; charset=ISO-8859-1
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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1539.1348810894.27098.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1348810894 news.xs4all.nl 6884 [2001:888:2000:d::a6]:51068
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:30360

Show key headers only | View raw


web2py (7 lines): https://gist.github.com/3798093

Includes creation of models, validator, controllers and urls.

Rules:
- Must have [at least] the same functionality as my 7-line example
- Imports are allowed and not taken into line count, on the condition
that everything remains generic. I.e.: one can change model and
controller names &etc without modifying imported libraries
- Can't import/take the code from web2py (e.g.:
https://github.com/web2py/web2py/blob/master/gluon/tools.py#L4098)

(feel free to write them in reply to this email and/or as gist comments =])

Good luck!

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


Thread

REST code-golf: How concisely can you expose and consume services? Alec Taylor <alec.taylor6@gmail.com> - 2012-09-28 15:41 +1000

csiph-web