build: adds SQLAlchemy ORM

This commit is contained in:
2024-09-22 13:58:36 -03:00
parent 54715ab119
commit d74faad9ec
2 changed files with 8 additions and 1 deletions

5
app.py
View File

@@ -1,7 +1,10 @@
from flask_sqlalchemy import SQLAlchemy
from flask import Flask, render_template
db = SQLAlchemy()
app = Flask(__name__)
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///adogapet.db"
db.init_app(app)
@app.route("/")
def hello_world():

View File

@@ -2,8 +2,12 @@ blinker==1.8.2
click==8.1.7
colorama==0.4.6
Flask==3.0.3
Flask-SQLAlchemy==3.1.1
greenlet==3.1.1
gunicorn==20.1.0
itsdangerous==2.2.0
Jinja2==3.1.4
MarkupSafe==2.1.5
SQLAlchemy==2.0.35
typing_extensions==4.12.2
Werkzeug==3.0.4