python-visualization / branca

This library is a spinoff from folium, that would host the non-map-specific features.
https://python-visualization.github.io/branca/
MIT License
118 stars 66 forks source link

Make Element class pickleable #99

Closed bwest2397 closed 2 years ago

bwest2397 commented 3 years ago

Make Element class (branca.element.Element) pickleable by stripping its ._env attribute when pickling and re-adding it when unpickling. This should address two related issues in folium: python-visualization/folium#878 and python-visualization/folium#796 and has the added implication of being able to create elements concurrently, e.g. using multiprocessing.Pool.