I have created many Python functions in QGIS Field Calculator Function Editor. How can I export the user defined functions to use in other computers or share to other people?

My QGIS is 3.12.1 on MacOS 10.15.7


The user Python functions are stored within the profile directory of your active profile. Under Mac it should be something like ~/Library/Application\Support/QGIS/QGIS3/profiles.

The easiest thing will be use Menu: Settings->User Profiles->Open Active Profile Folder. There you will find a folder /python/expressions where the Python functions are stored. You can copy the expressions folder or the Python scripts to other computer or profiles, then the functions will be available.

  • Yes, it is! Exactly it is here: ~/Library/Application Support/QGIS/QGIS3/profiles/default/python/expressions/. But the problem with this is that if I uninstall QGIS, I lose the scripts – dorbodwolf Jan 9 at 10:08
  • No, if you uninstall QGIS, the userprofiles will not be deleted - on windows, on Mac may be the same. – eurojam Jan 9 at 15:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.