OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Package name with username

  • Thread starter Thread starter dharmatech
  • Start date Start date
D

dharmatech

Guest
Let's suppose there's a company abc that makes a library abc.

I'd like to make a Python package that interfaces with abc.

I could just call it abc. However, that seems selfish to take that name in case the company itself wants to publish a package using that name.

Alternatively, I could incorporate my username:

Code:
dharmatech_abc

Or:

Code:
dharmatech.abc

Question​


If I go the username approach, which of the above is more idiomatic in Python packaging? Underscore or .?

If I decide to publish my package to pypi, and I went with the . approach, would the package be called dharmatech.abc?

If I go with the . approach, and I have other packages that also start with my username, will it be a problem that multiple separate packages all contribute to that dharmatech top level namespace?

Separate username package​


One approach is to simply have a package dharmatech and have abc be in there.

The drawback to that approach is, I may want to similarly prefix dharmatech for other packages. And I may not want those packages to be in the same github repository. I.e. they would be in their own github repositories and be considered separate Python packages, although with the same module prefix.
<p>Let's suppose there's a company <code>abc</code> that makes a library <code>abc</code>.</p>
<p>I'd like to make a Python package that interfaces with <code>abc</code>.</p>
<p>I could just call it <code>abc</code>. However, that seems selfish to take that name in case the company itself wants to publish a package using that name.</p>
<p>Alternatively, I could incorporate my username:</p>
<pre><code>dharmatech_abc
</code></pre>
<p>Or:</p>
<pre><code>dharmatech.abc
</code></pre>
<h2>Question</h2>
<p>If I go the username approach, which of the above is more idiomatic in Python packaging? Underscore or <code>.</code>?</p>
<p>If I decide to publish my package to pypi, and I went with the <code>.</code> approach, would the package be called <code>dharmatech.abc</code>?</p>
<p>If I go with the <code>.</code> approach, and I have other packages that also start with my username, will it be a problem that multiple separate packages all contribute to that <code>dharmatech</code> top level namespace?</p>
<h2>Separate username package</h2>
<p>One approach is to simply have a package <code>dharmatech</code> and have <code>abc</code> be in there.</p>
<p>The drawback to that approach is, I may want to similarly prefix <code>dharmatech</code> for other packages. And I may not want those packages to be in the same github repository. I.e. they would be in their own github repositories and be considered separate Python packages, although with the same module prefix.</p>
 
Top