Flask SqlAlchemy DB2 SQLALCHEMY_DATABASE_URI

Tony

i'm trying to figure out the Uri string to connect correctly to db2 using flask with SqlAlchemy.

I've tried with

  • db2:///?Server=server&;Port=50000&User=admin&Password=admin&Database=test"
  • 'ibm_db_sa+pyodbc400://{username}:{password}@{host}:{port}/{database};currentSchema={schema}

Any clue for the correct value?

Tony

Just for the record the correct format (at least for me) is

ibm_db_sa://{username}:{password}@{host}:{port}/{database}

Also you need a few libraries to install via pip in order to work with alembic+flask

In the ibm_db_alembic document is a typo in the description usage, the correct one to import is

from ibm_db_alembic.ibm_db import IbmDbImpl

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Flask-SQLAlchemy: Neither SQLALCHEMY_DATABASE_URI nor SQLALCHEMY_BINDS is set. Defaulting SQLALCHEMY_DATABASE_URI to "sqlite:///:memory:"

From Dev

insert to Db2 using Flask and sqlalchemy

From Dev

SQLALCHEMY_DATABASE_URI not set

From Dev

Create a DB with SQLAlchemy(Flask)

From Dev

Flask SQLAlchemy import DB import

From Dev

Missing zxJDBC connector in sqlalchemy (With DB2)

From Dev

Creating database with SQLAlchemy in Flask

From Dev

Creating a database in flask sqlalchemy

From Dev

Airflow: Neither SQLALCHEMY_DATABASE_URI nor SQLALCHEMY_BINDS is set

From Dev

Flask SQLAlchemy db.create_all() not creating database

From Dev

Return value for sqlalchemy db.execute() in Flask?

From Dev

flask error with SQLAlchemy / ORM -- not seeing db tables

From Dev

Flask-SQLAlchemy wtform based on db

From Dev

SQLAlchemy with Flask db.session.commit() not working

From Dev

flask sqlalchemy with circular imports with db models

From Dev

db not looping in html - python, sqlalchemy, flask

From Dev

Flask and SQLAlchemy db.session.commit not working

From Dev

flask sqlalchemy check if object exist in db

From Dev

Can't see .db file Flask SQLAlchemy

From Dev

Flask SQLalchemy, password is not stored in database

From Dev

Flask SQLAlchemy querying beetwen 2 tables

From Dev

SQLAlchemy and flask relationships

From Dev

Left Join in Flask SQLAlchemy

From Dev

Arguments of Column in SqlAlchemy Flask

From Dev

Python SQLAlchemy flask patterns

From Dev

Flask SQLAlchemy query join

From Dev

Unable to install Flask SQLAlchemy

From Java

Python Flask SQLAlchemy Pagination

From Dev

Inheritance in Flask-SqlAlchemy

Related Related

HotTag

Archive