Our new Python Variant Exporter helps you to export Add-on variants from the same codebase

We have developed a small tool to export different variants from the same Python codebase and named it Python Variant Exporter :-).

It is useful, e.g., if you are an addon developer and want to export a free and a commercial version of an addon from the same codebase.

If you have code like this:


def example():
    if __VARIANT__ in ['DEV', 'PRO']:
    elif __VARIANT__ == 'FREE':


Python Variant Exporter can export it for you to fit:

pvariant -d __VARIANT__=PRO example.py example_pro.py

def example():


See here for more:

We are looking forward to your feedback and some battle testing!

We just published our new Python Distribution Tools, which are most useful for Python addons/plugins/extensions. Ready to be battle-tested.

  • Python Vendoring Tool - Vendor libraries in a subpackage, which can be placed anywhere in a project.

  • Python Variant Exporter - Export a specific variant from a codebase.

  • Python Packer Tool - Pack a package into a single Python file.

Have a look here: https://pypi.org/project/pdistx/