python - Sharing SQLite3 database between multiple programs -
i've begin building web application using flask , flask-sqlalchemy. experience building web applications limited apologize before hand if being ambiguous.
the database web application built program running on server. tables predefined in database. web app , other program running on server have read & write access database.
recently i've decided restructure application , cater toward model-view-controller schema, similar django, , use blueprints making things more manageable , neater. similar https://github.com/mitsuhiko/flask/wiki/large-app-how-to
... app_name/ model.py view.py controller.py __init__.py ...
so i've done few tutorials , read on flask-sqlalchemy can't make sense life of me how define models in application if database predefined program??. , how can use sqlalchemy orm predefined database?
previously, before decided restructure, used pyhton's sqlite3 library grabbing stuff database , displaying on web page. wasn't pretty , way structuring things things have gotten out of hand fast.
does other program use sqlalchemy can lift/share models? if not, try reflection: http://docs.sqlalchemy.org/en/latest/core/reflection.html or experimental automap: http://docs.sqlalchemy.org/en/latest/orm/extensions/automap.html
and question wasn't this, sqlite3 file database, not client-server database. not saying will, may run concurrency issues:
http://www.sqlite.org/lockingv3.html
the os , filesystem plays role in this.
Comments
Post a Comment