M
M
malvin2017-04-30 08:56:37
Python
malvin, 2017-04-30 08:56:37

Which tutorial for Flask or which way to look for a simple endpoint?

You need to make a simple Endpoint, to which a webhook from a remote service will cling. The script then runs and does something. No web interface.
Recommend web app Flask.
Hence two questions.
1. Recommend a tutorial article or guide.
2. Perhaps there are other options. Ready-made public solutions or something else.
Thank you.
P.S.
endpoint requirements.
Finish webhook URL {finishWebhookUrl: String}
A custom endpoint that receives a HTTP POST right after every run of the crawler ends, regardless of its status, ie whether it finished, failed, was stopped, etc. The POST payload is a JSON object defining an _id property which contains an execution ID of the crawler run, eg {_id: "S76d9xzpvY7NLfSJc"}. You can use this ID to query the crawl status and results using the API. Beware that the JSON object might be extended with other properties in the future.
The response to the POST request must have a HTTP status code in 2XX range. Otherwise it is considered an error and the request is periodically retried every hour. If the request does not succeed after 48 hours, the system gives up and stops sending the requests.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
khlopko, 2017-04-30
@khlopko

Flask - flask.pocoo.org/docs/0.12/quickstart or in Russian https://habrahabr.ru/post/193242/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question