Python Packaging vs Golang Packaging
The original question was:
But I'm not sure that the library name = "cp-compat-logs-logger" defined in pyproject.toml would work. I tried importing that in my httpclient library and it complained.
Also, I see in the log_bridge library the logger is imported as from cp_compat_logs_logger.logger import Logger, but cp_compat_logs_logger is not the library name, so how is that working?
I think you've asked a totally valid question about "what's up with the names here?" The short answer is "Python has messy conventions, so the name you use to
poetry install is different than the name you use in code when
import name." It's conventional to have the
poetry install (let's call this the "distribution name") use dashes as a delimiter. However, actual module names in Python cannot have dashes, so the name used in code during
import name (let's call this the "module name") will (usually) use underscores in place of dashes.