Call Fabric directly in Python

I want to extend Fabric with some functionality and would like to invoke Fabric programmatically.

What I understood is to call the main() method in https://github.com/fabric/fabric/blob/master/fabric/main.py , but I cannot pass any parameters directly to because it reads its parameters inside the function.

Any idea to set command line options programmatically and calling main() ?

+6
source share
2 answers

You can use the execute method in the Fabric library to invoke tasks.

http://docs.fabfile.org/en/1.8/api/core/tasks.html?highlight=execute#fabric.tasks.execute

+8
source

You should read the Library Usage Documentation as it will most likely explain how to do what you are trying.

+2
source

All Articles