Skip to content

package

David Liu edited this page Jan 14, 2025 · 12 revisions

syntax

  • Python packages name should also have short, all-lowercase names. The use of underscores is discouraged
    • It should match the Regex ^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$
  • Python packages can only be published as a bundle, the Project level. Project always include multiple packages.
  • Python project doesn't have strict naming convention
  • Python package downstream user can import Package, but not Project
  • Python package extra only enclose dependencies, not source code.
    • Thus it cannot provide source code isolation
    • To wrap source code together with dependencies, you need to make it in an isolated pyproject.

Popular modules

For visualization

  • matplotlib, plotly, and seaborn

pypi

  • No unpublish: PyPI does not allow for a filename to be reused, even once a project has been deleted and recreated.
  • pip package installation is case-insensitive and treats underscores and hyphens equivalently.
  • No download statistics
    • Alternatively: project linehaul feed the PyPI public BigQuery dataset via Google Cloud Functions.
Clone this wiki locally