I defined a fabric def using decorators like below:
@task(alias=dp)
def deploy:
# the code
But I want to have access to the alias inside my def?
I can't use self. to get access :(
I am not sure if you can do it in direct way, but if you will call task trough the 'task api' - kind of wrapper - you will have access to the parameters, at least inside the 'itnernaltask'.
from fabric.api import execute, task
@task
def internaltask():
execute("deploy", alias=dp)