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


Groups > comp.lang.python > #105940

Re: Which are best, well-tested ways to create REST services, with Json, in Python?

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From justin walters <walters.justin01@gmail.com>
Newsgroups comp.lang.python
Subject Re: Which are best, well-tested ways to create REST services, with Json, in Python?
Date Mon, 28 Mar 2016 18:35:07 -0700
Lines 50
Message-ID <mailman.124.1459215309.28225.python-list@python.org> (permalink)
References <CAO1D73G+T6+jN5mu+04GoscQmJeXOxR2uV05HmzYDMUa15pDNA@mail.gmail.com> <1788096198.2418319.1459210649427.JavaMail.yahoo@mail.yahoo.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de TH5slLWT+m9PumV6kHbUfQA6ssIvZnm5ZOW/lyA2++vw==
Return-Path <walters.justin01@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.091
X-Spam-Evidence '*H*': 0.82; '*S*': 0.00; 'subject:Python': 0.05; 'framework.': 0.07; 'formatted': 0.09; 'subject:create': 0.09; 'url:pocoo': 0.09; 'python': 0.10; 'django': 0.13; 'subject: \n ': 0.15; '2016': 0.16; 'ideally,': 0.16; 'middleware': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'url:djangoproject': 0.16; 'wrote:': 0.16; 'documented': 0.18; 'preferred': 0.20; 'to:2**1': 0.21; 'code.': 0.23; 'xml': 0.24; 'header:In-Reply- To:1': 0.24; 'mon,': 0.24; 'rest': 0.26; 'scale': 0.27; 'least': 0.27; 'message-id:@mail.gmail.com': 0.27; 'this.': 0.28; 'information?': 0.29; 'issues.': 0.29; 'methods.': 0.29; 'robust': 0.29; 'tutorial': 0.29; 'there.': 0.30; 'probably': 0.31; 'options': 0.33; 'this?': 0.34; 'received:google.com': 0.35; 'question,': 0.35; 'something': 0.35; "isn't": 0.35; 'project': 0.36; 'there': 0.36; 'url:org': 0.36; 'received:209.85': 0.36; 'framework': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'method': 0.37; 'list.': 0.37; 'doing': 0.38; 'received:209': 0.38; 'several': 0.38; 'data': 0.39; 'url:en': 0.39; 'does': 0.39; 'subject:-': 0.39; 'well.': 0.40; 'to:addr:python.org': 0.40; 'subject:with': 0.40; 'hello,': 0.40; 'easy': 0.60; 'secure': 0.60; 'your': 0.60; 'skip:n 10': 0.62; 'more': 0.63; 'personal': 0.63; 'here:': 0.63; 'you.': 0.64; 'mar': 0.65; 'forward': 0.66; 'articles': 0.67; 'regards.': 0.67; 'production': 0.67; 'hearing': 0.67; 'reply': 0.68; 'choose': 0.68; 'services.': 0.72; 'insight': 0.79; 'david,': 0.84; 'fast,': 0.84; 'literature': 0.84; 'overhead,': 0.84; 'to:addr:yahoo.co.uk': 0.84; 'subject:services': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=YZuDYiYbb0cu3KmUAh9lU923e9NRqkDlw+nuYSIAtxc=; b=peGE3pFvsiDefw/nISl2yWFuDwx3j4wAX5ij76jOQgNEoQODnWXizfwBtSnPrar3Lh lHGTJ38duxHx/jOB1S+q5jaTbamUyWHK2ZjJXLV4mIJSoLPcblA5ORXW9cZAtlh4mefd Lvbm/TOH5uLj/vBB/rYLRYcWjQEoGw5RDxVvnZXaBaZXY3IfdCgSx41rPOKxhX3fKOtj vUpCibsGYYlxMEliC55wutdOKM0IBf1Ejr1TBQXsEaCbnuTHavfqZoSYeTgocT8DDOzC vGBgNi37o3ZKRnpnQyI5psEF5/TIv5t8+J2UiM0FYqXPPLyGp7L4pRZ1qTRZc/QTMkkU kx/A==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=YZuDYiYbb0cu3KmUAh9lU923e9NRqkDlw+nuYSIAtxc=; b=Xy7OZ6rZzR3nvf3YXxN8+dspfG8afHPoMSTfBn4eGTEMgGoSUo1yaouypMcvRxH8VF t6ZIIASVg/Frfnp/I/GdjRvOsYbb8IZDinnwEKNAaTr5h+dSaSrF2y0tXcuPpIZhTrd+ /V91QxbjP4cFVAR3rEbKsvlLll/26yWbRBJBe/O7DwcLYmFly5x7C9CiIzcgEDi5xpTv Pb/3hlA7mQzLSM0LeX4qqrfqJPSRYUEwgBwSaPFmUtbBhDakctdSYEESPPFZnQuZFTuA iZ6e8B/TDzJYKIBNC8PEud4/NmAlHezZIea0bOHxrkj3LT+IdA0kdzer+Rtkxx0sFKYr 2BMw==
X-Gm-Message-State AD7BkJJdrs8jxsZjN6JJMzgUgBdfDMVohoIuiho51I4J7ZqJKutL6YfiBpcaDEWAr/6k4rDti6YLb1tb/z3dvg==
X-Received by 10.112.62.165 with SMTP id z5mr9170372lbr.89.1459215307178; Mon, 28 Mar 2016 18:35:07 -0700 (PDT)
In-Reply-To <1788096198.2418319.1459210649427.JavaMail.yahoo@mail.yahoo.com>
X-Content-Filtered-By Mailman/MimeDel 2.1.21
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21
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>
Xref csiph.com comp.lang.python:105940

Show key headers only | View raw


On Mon, Mar 28, 2016 at 5:17 PM, David Shi <davidgshi@yahoo.co.uk> wrote:

> Hello, Justin,
>
> I am thinking of a fast, responsive, secure way of doing this.  Python at
> server-side.  It provides REST services.  Data exchange with the
> web--page.  Formatted XML or Json.
>
> Ideally, it uses the least code.
>
> Any excellent literature describes this?  I like articles which give
> insight into the nitty-gritty.
>
> Looking forward to hearing from you.
>
> Regards.
>
> Shao
>
>
>
>

David,

Please reply all on this list.

My preferred method is to use Django with Django Rest Framework. Django is
a very mature and robust framework with a ton of features. I use it in
production for several projects and have very few issues. It includes
middleware authentication and security features as well. You can find the
Django documentation here: https://docs.djangoproject.com/en/1.9/. If
you've never used Django before, I recommend going through the official
tutorial. It is also advised to use Python 3.4+.

Django rest framework is probably one of the best documented packages out
there. You can find it's documentation here:
http://www.django-rest-framework.org/. The official tutorial is very
in-depth. I would recommend working through it as well. DRF includes a lot
of functionality and multiple authentication and serialization methods.


There are other options as well depending on the scale of your project you
may choose to use something like flask: http://flask.pocoo.org/ with
flask-restful and sqlalchemy.

Like I said my personal recommendation is Django and DRF as it is easy to
set up, there isn't much overhead, and it scales very well.

Does that answer your question, or were you looking for more information?

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


Thread

Re: Which are best, well-tested ways to create REST services, with Json, in Python? justin walters <walters.justin01@gmail.com> - 2016-03-28 18:35 -0700

csiph-web