I am really new to python packaging. It already is a confusing topic with recommended ways and options that only a minority seems to apply. But to make it worse, I stumbled over this problem.
I started with the intention to write a rather small package with a really focussed purpose. My first solution included import of pandas. But I got the request to remove that dependency. So I tried to refactor the function and unsurprisingly it's slower. And slower to an extent that I can't hardly accept it.
So a solution would be to provide a package that uses pandas and a package that don't uses pandas. So that people can use either or, depending on project requirements. Now I am wondering what the best way is to provide that.
I could:
- Create two seperate projects with different package names. That would work, but I want to keep the code together and there are functions and code shared.
- Do 1. but import the shared parts from the simple package.
- Use subpackages in case that would result in removing dependency for the core subpackage.
What is a good way to fulfill the different needs?