Skip to content
Notes & thoughts on clean Python package design
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.


Notes & thoughts on clean Python package design.

Understand the concepts behind this code

A Python Package Developer’s Cheat Sheet @ Better Programming / Medium

Core files

  • the package’s descriptor file, consists of a Python script where multiple properties can be set declaratively. Properties declared in this file are recognized by package managers such as pip and IDEs such as PyCharm, which means this is a must-have for any package.

  • setup.cfg: used to customize setup scripts, such as setting pytest as the default runner for python test command.

  • pytest.ini: contains parameters for pytest execution. For example, presenting coverage results both in the console and HTML files.

  • .coveragerc: controls the coverage script scope. This is pretty useful when you have folders in your project that don’t need to be monitored by the tool. In the proposed clean structure, only the src folder needs to be covered.

You can’t perform that action at this time.