Skip to main content

Scrapli SCP

Welcome to Scrapli SCP project!

This project is about to add smart SCP capability to Scrapli based connections. By smart, I mean various checks before and after the file copy to ensure the file copy is possible and successful.

These are the checks done by default:

  1. checksum

  2. existence of file at destination (also with hash)

  3. available space at destination

  4. scp enablement on device (and tries to turn it on if needed)

  5. restore configuration after transfer if it was changed

  6. check MD5 after transfer

Requirements

scrapli, scrapli-community, asyncssh, aiofiles

Installation

$ pip install scrapli-scp

Simple example

You can find it in test folder but the main part:

async with AsyncScrapli(**device) as conn:
    scp = AsyncSrapliSCP(conn)
    result = await scp.file_transfer("put", src=filename, dst=".", force_scp_config=True)
print(result)

Progress bar example

from rich.progress import Progress

with Progress(refresh_per_second=100) as progress:
    task = progress.add_task("Getting config...")

    def progress_handler(srcpath: bytes, dstpath: bytes, copied: int, total: int):  # arg signature is important!
        progress.update(task, completed=copied, total=total, description=dstpath.decode())

    async with AsyncScrapli(**device) as conn:
        scp: AsyncSCPFortiOS = AsyncSrapliSCP(conn)
        result = await scp.get_config(
            filename=filename,
            overwrite=True,
            force_scp_config=True,
            progress_handler=progress_handler
        )
print(result)

Metadata

Release files for scrapli-scp 0.1.0

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

Source distribution (sdist)

Source distribution for scrapli-scp 0.1.0
File Size Uploaded
scrapli_scp-0.1.0.tar.gz 13.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scrapli-scp 0.1.0
File Interpreter ABI Platform
scrapli_scp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.6 kB

Release files / scrapli_scp-0.1.0.tar.gz

Download URL scrapli_scp-0.1.0.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d8e08b5990e941d6f3bc8de6530ab71186136a3ccebac6e60adf4b8306242f2c
BLAKE2b-256 checksum
How to use checksums
85b7234b7e32c802ad7c9d385dbe942eaac54a4ca5e43e5ec0bde550cede46fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 18, 2026.

Transparency log

Release files / scrapli_scp-0.1.0-py3-none-any.whl

Download URL scrapli_scp-0.1.0-py3-none-any.whl
Size 15.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9de4a64219096b914af2fafc55ed44933e355d4ee44961c1a9bcedec3ca3fa92
BLAKE2b-256 checksum
How to use checksums
daaca57616e1038d96aed91fbaf7f4fbcfef02946682f132259e7f6d38fe661f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

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