Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Use SqlAlchemy for ORM instead of psycopg2 #54

Open
sovaa opened this issue Dec 12, 2017 · 0 comments
Open

Use SqlAlchemy for ORM instead of psycopg2 #54

sovaa opened this issue Dec 12, 2017 · 0 comments

Comments

@sovaa
Copy link

sovaa commented Dec 12, 2017

The project is currently tightly coupled to psycopg2. It should be decoupled and the business logic should depend on SqlAlchemy instead. This leads to:

  • unit tests can be written,
  • participants can depend on a versioned module for local calc of consistency and concordance.

Currently what many are doing is they copy-paste the methods into their project, since their models likely doesn't depend on postgres. Thus fixes/changes to this repo will not be synced to peoples models or 3rd-party tools.

Unit tests can't be written easily since psycopg2 is used directly. If SqlAlchemy is used an in-memory/sqlite driver can be chosen instead, without affecting the business logic.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant