I am building a modular application in python. The plugins are not known until runtime.
I envisage that many plugins will create/read/update data, which they themselves care about, and other plugins may care about too.
An approach I am considering:
- one plugin may be concerned with
Users
. - Another plugin may be interested in one or more email addresses for those users.
- The Users plugin would expose the data, but the email data would not be available for joins outside .
What strategies/tools would you suggest I start constructing and using a modular database? Is this something an ORM tool could cater for? Is there any other magic I haven't considered?
I am envisaging that a side effect of a plugin architecture will make it more likely that the data will end up fairly normalized.
Edit:
- by plugins, I mean that the consumers of the plugins do not know about them upfront - they don't import them, rather the host plugins discover the extension plugins, or have them injected in.
- I am not looking for a database engine/ORM tool that is modular, I am looking to allow plugins to create a modular data model, which can be added to as more plugins are found.
- I am happy to write my own, but don't want to badly re-implement something that is already existing and much better
- I am happy to write my own, but don't want to implement a weak design where much stronger ones are more obviously suited to Python.