- #1
fog37
- 1,549
- 107
- TL;DR Summary
- Wrapper libraries and the backend software they support
Hello,
I understand that a software library is called "wrapper library" if it provides a level of abstraction to another library: we can use the wrapper library instead of using the backend library directly to have an easier and more convenient access to the backend library functionalities.
One example from the Python world is the pair of viz libraries Matplotlib and Seaborn. It is standard to always imported both two libraries together but we could import only one of them and use it alone.
Seaborn is built on top of matplotlib and is said to be a wrapper library for matplotlib. That means that seaborn can do everything that matplotlib does. Seaborn is just an easier to use interface (API) to use all the functionalities of matplotlib under the hood.
I understand that a software library is called "wrapper library" if it provides a level of abstraction to another library: we can use the wrapper library instead of using the backend library directly to have an easier and more convenient access to the backend library functionalities.
One example from the Python world is the pair of viz libraries Matplotlib and Seaborn. It is standard to always imported both two libraries together but we could import only one of them and use it alone.
Seaborn is built on top of matplotlib and is said to be a wrapper library for matplotlib. That means that seaborn can do everything that matplotlib does. Seaborn is just an easier to use interface (API) to use all the functionalities of matplotlib under the hood.
- That said, why do we need to also import matplotlib if seaborn can do everything anyway? Is it simply because seaborn can only get so far and does not really access ALL the capabilities of the more sophisticated matplotlib? Matplotlib has a slightly harder syntax but we can tweak more with it. Is that correct?
- Importing seaborn does not automatically import matplotlib. However, in the case of the Python libraries Keras and Tensorflow, Keras is the API and wrapper library for TF and Keras does not work without the Tensorflow engine. TF is always imported implicitly or explicitly and needs to be there...That is not the case for the pair matplotlib and seaborn...Why?
- Do you have any other example of wrapper library in Python? Many libraries are built on top of other libraries. For example, pandas is built on top of numpy and matplotib. But "built on top" simply means that the these libraries started out from the skeleton of these other two libraries. It does not mean that pandas is a wrapper library for numpy or matplotlib...Correct?