django - Converting and Unifying API data in Python -


i'm trying pull similar data in several third party apis, of have varying schemas, , convert them unified schema store in db , expose through unified api. re-write of system this, minus storing in db, hard test , not elegant. figured i'd turn community wisdom. here thoughts/what i'd achieve.

  • an easy way specify schema mappings external apis schema internal schema. realize nuances in data might lost converting unified schema, that's life. schema mapping might not easy , perhaps overkill academic papers i've found on matter.
  • an alternative solution allow third parties develop interfaces external apis. code quality of these third parties may or may not known, established via thorough tests.
  • therefore system should easy test, i'm thinking mocking external api calls have reproducible data , ensure parsing , conversion being done correctly.
  • one of external api interfaces crashing should not bring down rest of them.
  • some sort of schema validation/way detect if external api schemas have changed without warning
  • this end being integrated django project, written django app, make unit , integration testing easier. on other hand, keep decoupled possible django. although api interfaces have know format convert to, specified @ runtime?

am missing in wishlist? unrealistic? headed down wrong path? love feedback.

i'm not sure if there libraries/os project of this. less wheels have reinvent better. part of valuable os project?

in previous version spawned bunch of threads handle individual requests. although i've never used it, i've been told should @ gevent way handle this.

for second bullet point should check out temboo. temboo normalizes access on 100 apis, meaning can talk them using common syntax in language of choice. in case use temboo python sdk - available here.

(full disclosure: work @ temboo)


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -