planet-client-python icon indicating copy to clipboard operation
planet-client-python copied to clipboard

Native namespace package?

Open beplanet opened this issue 3 years ago • 0 comments

Hello,

Have you all considered using a native namespace package for the top-level "planet" package? Then put a regular package with an __init__.py under a sub-package like "client"?

This would allow for other Planet-originated projects (internal or external) to:

  • to exist in the same python installation
  • re-use the same top-level "planet" package name

This is how google's python client projects work. The top-level "google" directory under site-packages has no __init__.py file, but there is one under individual products like "storage" in "google.cloud.storage".

I realize this would generate a lot of refactoring churn, but thought I'd mention it before locking into a structure for 2.x where no other planet artifacts could use the "planet" name.

See also:

  • https://packaging.python.org/en/latest/guides/packaging-namespace-packages/#creating-a-namespace-package
  • https://peps.python.org/pep-0420/#packaging-implications

beplanet avatar Sep 15 '22 19:09 beplanet