Thin facade atop fabric
Project description
mo-fabric
A façade atop fabric2
Overview
I have revisited Fabric (September 2018) to find it can handle multiple threads and multiple connections! This is great news: it makes all my automation faster!
Like with most APIs, I made a façade because Fabric is not congruent to my own programming conventions. This is not bad, just different: The domain I work in is slightly different than what the Fabric developers expect.
Here are the differences:
- All
stdout
andstrerr
from the remote machine is annotated, and shunted, to the local logging module. - A few convenience methods are added:
conn.exists(path)
- to test if a remote file existswith conn.warn_only():
- context manager if you do not care if your commands failget(remote, local, use_sudo=False)
- allows you to use tilde (~
) on Windows to refer to home directoryput(local, remote, use_sudo=False)
- similar toget
, except copies files to remotesudo(command)
works with thecd()
context managerResult.__contains__()
so checking for patterns in command output is simpler:result = conn.run("ls /data1", warn=True) not_found = "No` such file or directory" in result
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mo-fabric-3.30.19346.tar.gz
(4.2 kB
view details)
File details
Details for the file mo-fabric-3.30.19346.tar.gz
.
File metadata
- Download URL: mo-fabric-3.30.19346.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/2.7.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61f89c2e102e03c07b7e46e50ce8de795c9f16511c04030f477cc4ede6e460d2 |
|
MD5 | b15d7ba49860ed70809f87628c494c0c |
|
BLAKE2b-256 | 92eff2a6a95b242f3cb1bda69e84b2d9afe49a3b52961af1d37c4705d36db1a7 |