Flask-Perm's docs show how to do this right at the top.
Create the extension outside the factory. Init the extension inside the factory. Every Flask extension that supports app factories uses this pattern.
perm = Perm()
def create_app():
app = Flask(__name__)
perm.init_app(app)
return app
Now you can use from myproject import perm
wherever you need to access it.