Skip to content

Instantly share code, notes, and snippets.

View MohammedRashad's full-sized avatar
🎸
Developing New Tech

Mohamed Rashad MohammedRashad

🎸
Developing New Tech
View GitHub Profile
@MohammedRashad
MohammedRashad / RESTful.py
Last active April 22, 2017 20:07 — forked from miguelgrinberg/rest-server.py
Code used to demonstrate RESTful APIs in my API Design Workshop in NASA Space Apps Ismailia 2017 (Data Bootcamp)
#!flask/bin/python
from flask import Flask, jsonify, abort, request, make_response, url_for
from flask.ext.httpauth import HTTPBasicAuth
app = Flask(__name__, static_url_path = "")
auth = HTTPBasicAuth()
@auth.get_password
def get_password(username):
if username == 'miguel':