ionelmc / cookiecutter-pylibrary

Enhanced cookiecutter template for Python libraries.
BSD 2-Clause "Simplified" License
1.25k stars 207 forks source link

Distribution vs package naming #228

Closed labdmitriy closed 2 years ago

labdmitriy commented 2 years ago

Hi @ionelmc,

I read your posts before and just now I find your great cookiecutter template, thank you for your work!

Recently I gathered information about package vs distribution names for Python libraries, especially about their naming. Based on this information I wrote the article - https://labdmitriy.github.io/blog/distributions-vs-packages/

I found that your cookiecutter template has the most explicit distinction between repository, distribution and package names and you convert hyphens to underscores for distribution names. Could you please share your thoughts about this choice (why do you use hyphens instead of underscores for distribution names) and probably any information/feedback you consider useful? Then I can add this information to the blog with the link to you and your template.

Thank you.

ionelmc commented 2 years ago

I guess the main reason I have this dist/package/project name distinction is that I don't always have a consistent scheme for all my projects:

About the dashes... it's just styling at this point. https://pypi.org/project/lazy-object-proxy/ is the same as https://pypi.org/project/lazy_object_proxy/

To put it differently: you'll see dashes more often than underscores in urls in general. I haven't given it much thought, just went with what people usually have in urls (dashes instead of underscores), sorry to disappoint :-)

labdmitriy commented 2 years ago

Thanks a lot for your answer!

labdmitriy commented 2 years ago

@ionelmc if you don’t mind, I will include your template and answer to the post because it is also useful information

ionelmc commented 2 years ago

Sure, thanks.