2

I am using Flask,Flask-SQLAlchemy, and Postgres. I have set up the Postgres instance to allow local connection only i.e. can be accessed via SSH.

How can I use Flask-SQLAlchemy both Core:

from sqlalchemy import create_engine

engine = create_engine('postgres://etc')

and ORM:

from flask import Flask
from flask_sqlalchemy import SQLAlchemy

app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgres://etc'
db = SQLAlchemy(app)

What do I need to change if my SQLAlchemy code is as above?

0

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.