Is transpling python library to javascript feasible and good approach to share data between multilanguage components?

I’m looking for a way to share common data sources for a system along many node / python services.

Currently I’ve data source lib written in python, and to avoid latencies I’d like not to create REST api with it but instead transpile it on the fly to JS, publish it as npm lib so all of our services can use it. It sounds like a good idea in my head but I’d like to hear opinions and experiences with this approach, if it’s feasible, and any tools you’d recommend for doing this.

EDIT: library consists of enum and dicts only

Leave a Comment