V
V
Vic Shostak2017-09-25 12:40:48
Python
Vic Shostak, 2017-09-25 12:40:48

REST API. Which Python framework to choose for the backend? What do you use?

Good day.
To begin with, I will describe the situation: I got a project (PHP 5.1.x, ~2004 release) for processing, which is a regular service for ordering excursions. That is, nothing complicated: I registered on the site, chose a service, entered my data and desired dates, indicated where and with what guide (from the catalog, with a biography and photo) you want to go, sent it. The order went to the server, was saved, and was displayed in the personal account. In short, the usual functionality, nothing special.
And here is the REST API, you ask. I will answer: the project itself is unremarkable, but it allows you to set a special order form (consider the same form, but iniframe) to any other sites (partners). In order to determine which of the partners to assign an order from their form, a key is generated in the personal account (MD5 according to all account data), which is then inserted into the script to call the frame.
So, in order to make everything more technologically advanced, easily expandable / supported and fast (and this whole story is pretty slow, especially in the season when more than 300+ partner sites start generating orders from their side into a single database), I want to give it a quality REST API backend on one of the Python frameworks + PostgreSQL 9.6. I have already implemented the external part in Vue.js.
So my choices so far are:

  1. Django (Django REST framework)
  2. Flask
  3. Bottle\Eve
  4. Falcon

Flask and Bottle - I already used it for other projects, but the organization of a full-fledged REST API was not critical there, only requests from the frontend, and so, on trifles. So the answer is obvious: take what you already know, but all sorts of performance benchmarks and the very simplicity of the framework confuse me (for example, the REST API on Eve is five lines of code and there is nothing there, while Django has a separate module and a bunch of settings, but there are many more opportunities and community support).
Actually, hence the question: what is better to take?
Maybe you can get by with Google Firebase or a similar service?
I will be glad to sensible advice/use cases. Thanks in advance!

Answer the question

In order to leave comments, you need to log in

6 answer(s)
F
Fixid, 2017-09-25
@Fixid

For REST I liked Flask

S
Sergey Nizhny Novgorod, 2017-09-25
@Terras

I didn’t understand something, but why not take Django and its excellent Django-Rest framework? Stable system, works well and reliably. Why reinvent the wheel.

D
Dmitry, 2017-09-25
@EvilsInterrupt

I recommend looking at aiohttp. It is being cut by one of the python core developers who has his hands in the right place. Flask based usage idea. Only Flask, though hellishly convenient, is not asynchronous!

A
Alexander, 2017-09-25
@Survtur

And I love cherrypy , which is damn minimalistic and very flexible. It provides a basic framework with which you can do a lot.

O
Oleg Gamega, 2017-09-25
@gadfi

take what you know better
if python then I am for flask if there are no such restrictions then I am for asp

R
Ranc58, 2017-09-25
@Ranc58

An interesting option REST API

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question