Skip to content

Instantly share code, notes, and snippets.

@ryan-blunden
Created January 21, 2021 01:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryan-blunden/957bfc7fdb619e5ae70a6f9728e46492 to your computer and use it in GitHub Desktop.
Save ryan-blunden/957bfc7fdb619e5ae70a6f9728e46492 to your computer and use it in GitHub Desktop.
Chuck Norris random quote generator
from flask import Flask
import requests
app = Flask(__name__)
@app.route('/')
def chuck_random():
return requests.get('https://api.chucknorris.io/jokes/random').json()['value']
app.run()
dev:
FLASK_ENV=development python3 chuck.py
flask
requests
httpie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment