Did I find the right examples for you? yes no

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)
This takes a base MineCraft level and adds or edits trees.
Place it in the folder where the save files are (usually .../.minecraft/saves)
Requires mcInterface.py in the same folder.

src/m/c/mcedit-HEAD/filters/MCEditForester.py   mcedit(Download)
 
from pymclevel.materials import alphaMaterials
import Forester
import mcInterface