Answer the question
In order to leave comments, you need to log in
How to give json to clients via api in Python?
There are a few sites that don't have an api. I need to parse these sites (a couple of times a day) and write data to the sqlite database. At the request of clients (for example: https://site.com/get_data?number=4&count=3) give data in json using Python. Just with the latter I have difficulties, I do not know where to dig. We need something simple, not requiring a long setup. I know there is a "Tornado web server", but I don't know if it's suitable? Or what do you recommend?
Answer the question
In order to leave comments, you need to log in
Don’t take Django, it’s thick and not quite for these purposes (although it can REST)
Tornado, twisted-web, cyclone and others like them - don’t take it either, they are old and designed for python2
What to take
- Flask (web framework) + SqlAlchemy (library for SQL) - most documentation
- Falcon or Bottle - very fast
- Kein - this one is twisted, almost tornado, but for python3
- aoihttp - very fast, fully asynchronous on python3.5+
From all of the above it is easier to start with flask - search for "flask Mega Tutorial"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question