Skip to content

Instantly share code, notes, and snippets.

View jaumendes's full-sized avatar
🎯
Focusing

José Mendes jaumendes

🎯
Focusing
View GitHub Profile
@jaumendes
jaumendes / app.py
Created September 13, 2023 22:31 — forked from betterdatascience/app.py
Python Database Driven REST API
from flask import Flask, request, jsonify
from flask_sqlalchemy import SQLAlchemy
from flask_marshmallow import Marshmallow
from flask_restful import Resource, Api
app = Flask(__name__)
api = Api(app)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///users.db'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False