fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] Fabric as a Library and fabfile


From: Jeff Forcier
Subject: Re: [Fab-user] Fabric as a Library and fabfile
Date: Tue, 19 Feb 2013 12:37:33 -0800

On Tue, Feb 19, 2013 at 12:33 PM, Ryan Langford <address@hidden> wrote:
> Hello,
>
> How do I properly load fabric as a library in a python script and get
> it to leverage a fabfile?


Hi Ryan,

First, see http://docs.fabfile.org/en/1.5/usage/library.html for
details on what it means to use Fab as a library.

Second, re: a fabfile, when not used via 'fab' fabfiles are literally
just Python modules, same as anything else. Import the specific
subroutines you want to use, and call them using the 'execute()'
function (as outlined in that link). execute() honors decorators and
such so you can often get similar behavior to what 'fab' would do for
a given task.

Best,
Jeff


>
> Thanks,
>
> Ryan
>
> _______________________________________________
> Fab-user mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/fab-user



-- 
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]