Flask
Restful Sample App using Flask
Flask app with Blueprint
Flask in production
https://faun.pub/deploy-flask-app-with-nginx-using-gunicorn-7fda4f50066a
https://faun.pub/deploy-flask-app-with-nginx-using-gunicorn-7fda4f50066a
run the gunicorn with --preload
async operation with gunicorn
use eventlet
add timeout
gunicorn --preload -w 16 --threads 2 -k eventlet -b 0.0.0.0:5007 app:app --timeout 120
App Documentation
Postman
Swagger with Flask
Implementation
Objective: Create an app with 4 endpoints, which returns different information and insights of Github profiles. 3 endpoints include:
Input: location and programming language
Output: Return 30 Github profile URLs
Input: Github profile URL
Output: Profile personal information summary (with different attributes)
Input: Github profile URL
Output: All repository summary connected to the profile
The object to create 3 endpoints is to understand, how to structure and separate multiple requests.
url = "https://api.github.com/search/users?q=location:{0}+language:{1}".format(first, second)
response_dict = requests.get(url).json()
Last updated
Was this helpful?