title: Using PostgreSQL through SQLAlchemy with Flask
body: <p>I have a build in the example in the code below and I want to replace it with postgresql. What should I do ?</p>
  
  <pre><code>from flask_sqlalchemy import SQLAlchemy
  
  app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////Users/bozkurt/Desktop/veritabani.db'
  app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
  app.config['SQLALCHEMY_COMMIT_ON_TEARDOWN'] = True
  db = SQLAlchemy(app)
  
  class users(db.Model):
      id = db.Column(db.Integer, primary_key=True)
      username = db.Column(db.String(80))
      email = db.Column(db.String(120))
      password = db.Column(db.String(80))
  
  class bilgi(db.Model):
      id = db.Column(db.Integer, primary_key=True)
      siteAdi = db.Column(db.String(80))
      Aciklama = db.Column(db.String(80))
  
      #query 
          user = users.query.filter_by(username=usernmae).first()
  
      #add
          ekle = bilgi(id = id,aciklama=text)
              db.session.add(ekle)
              db.session.commit()
  
  if __name__ == "__main__":
      db.create_all()
      app.run(debug=False)
  </code></pre>
  
  <p>Love, good day!</p>