In my application, the MongoDB collections need to be updated by a server-side script job (IE: a cron job that scrapes/pulls from other APIs every 30minutes). What I really want to do is make updates to the MongoDB collections, but have the data be validated against the schema and include metadata (updated, created, etc).
The two ways that come to mind to solve this is:
- Have a fake client to do HTTP POST/PUT/PATCHES. However, this means this fake client would have to deal with things like authentication/authorization/last-modified-since.
- Use PyMongo to interact with the DB directly. However, this means I wouldn't have the data validation, or the metadata stored.
Does Eve have hooks for the database so that I can do Eve-rich database updates without HTTP?