Skip to main content

PyPI - Version PyPI - Python Version PyPI - License GitHub Actions Workflow Status

FabricPlus

A drop-in expansion of features in the Fabric library.

As of version 0.1.0, those include:

  • Jumphost connectivity support
    • jump_run command to run commands from the intermediate jumphost
  • SCP Transfer support (including via a jumphost)
  • su command support

See the API documentation on the FabricPlus Website for more information, as well as "Getting Started" guide.

See fabric for more details on the base fabric library, if interested in the underlying behaviors. Some have been changed: see Important Changes and the documentation for more information.

Note On Changelogs

v1.0.1

  • Bugfix: su command had an invalid argument when processing subcommands. Fixed.

Installation

pip (via PyPI)

As of version 0.1.0, FabricPlus is available via pip and is on the Python Package Index.

To install, simply install fabricplus.

pip install fabricplus

Building From Source

You can also build fabricplus from source, especially if you want features or updates released outside of a tagged release on PyPI.

To do so, you'll need poetry, and an environment with a version of Python greater than or equal to 3.8.

Step 1: Install Poetry

To install poetry, simply run:

pip install poetry

For more information on poetry, see the Poetry Website.

Step 2: Clone Repo and Run poetry build

Once you have that installed, clone the repo, then run poetry build from the root directory:

# Clone
git clone https://github.com/prokopto-dev/fabric-plus
# Move into fabric-plus
cd fabric-plus
# Run poetry build
poetry build
# install with pip the newly build wheel file (file name may vary)
pip install dist/fabricplus-0.1.0-py3-none-any.whl

Quick-Start

The following is all the basic new features in one small block.

# importing as Connection
from fabricplus.connection import ConnectionPlus as Connection

# Creating a basic connection
conn_1: Connection = Connection("host1.example.com")

# Creating a jumphost connection, and then a host connection via that jumphost
jumphost_1: Connection = Connection("jumphost.example.com")
conn_via_jh: Connection = Connection("host2.example.com", jump_target=jumphost_1)

# Creating a host that uses SCP for transfers by default
conn_2: Connection("host3.example.com", scp=True)

# Running a get via SCP on the host1/conn_1, which doesn't use SCP by default
conn_1.get("/path/to/some/remote/file", scp=True)

# Running a command as some other user via su
conn_1.su("date", user="someotheruser", password="someuserspasswd")

License Addendum

  • scp.py is used by import under the LGPL v2.1 license, and this notice is in accordance with that license.
  • paramiko-jump used under Apache License 2.0, see fabricplus/paramiko_modifications/client.py for license details.
  • fabric is used, and falls under a BSD-2-Clause license, which doesn't restrict its use as an imported library, but is noted here anyways.

Release files for fabricplus 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fabricplus 1.0.1
File Size Uploaded
fabricplus-1.0.1.tar.gz 12.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fabricplus 1.0.1
File Interpreter ABI Platform
fabricplus-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 25.2 kB

Release files / fabricplus-1.0.1.tar.gz

Download URL fabricplus-1.0.1.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
cc2d30b43efddd8a5c5d1cdb2c1dfbf32d49cbf9e9fa8bc2c97843c599ab1d2e
BLAKE2b-256 checksum
How to use checksums
1d754a784ee1868a14ab7b42b80f3a91be004e662baa755cdf764662fc119f66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.14 Linux/6.5.0-1021-azure

Release files / fabricplus-1.0.1-py3-none-any.whl

Download URL fabricplus-1.0.1-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb0150c9620e7b44a57897cc0407ca815e107f0b5d107335a6b23af58a28e7bb
BLAKE2b-256 checksum
How to use checksums
3a89a7962c8fd1e1d3963f51d0ae31f55d884a16289f8d9739b49df8701ca8d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.10.14 Linux/6.5.0-1021-azure

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page