A quick guide / framework to use Flask and IRIS side by side.
It follows the Official Flask Documentation and the Flask-SQLAlchemy Documentation as close as possible, so that you can easily use them to continue the developing of your application without conflicts.
(Optionally) Create and activate virtual environment. The following code is an example for Windows.
python -m venv .venv .venv/Scripts/activate
Clone this repository
git clone https://github.com/heloisatambara/flask-iris.git
Make sure you’re in \flask-iris> directory on your terminal and type
pip install -r requirements.txt
Make sure that the instance is running.
engine = create_engine("iris://_SYSTEM:sys@localhost:1972/SAMPLE")
Run on debug mode.
...\flask-iris> flask --app flaskr-iris run --debug
If you have the default configuration, you will have tables called SQLUser.post and SQLUser.user on the selected namespace, if you wish to perform any treatment with InterSystems’ products. You can find it on Studio on the User folder.
(STILL ON DEVELOPMENT) Also, you can check out step-by-step how this was developed on the Example of Flask application with SQLAlchemy IRIS article.
Feel free to contact me for any doubts!