Skip to main content

Prefect Managed File Transfer

Prefect Managed File Transfer: Prefect connected to folders labelled M, F and T
PyPI

Turn a prefect.io server into a managed file transfer solution. UI and Programatic creation of cron style jobs (aka Flows!) to upload and download files easily between servers. Support local, SFTP remotes plus any Cloud storage supported by rclone - so thats aws, azure, google, sharepoint, and many more out of the box.

Using prefect for managed file transfer means retries, logging, multi node and high availability come as standard - turning prefect into a reliable enterprise ready file transfer solution.

This package is not the fastest solution to move files around, but it prioritises reliability and ease of use, making it an excellent choice for replacing both quick cron job copy scripts and enterprise managed file transfer appliances.

RClone: This package will automatically use rclone from your system PATH if it is already installed. If rclone is not found on the PATH, it will fall back to using a bundled copy of rclone (currently version v1.75.0) included in the package for Linux, Windows, and macOS.

Key features

  • Copy, move, and delete files between almost any storage system easily.
  • Reliable file operations with checksumming, file size checking etc.
  • Smart and safe moving - settings to allow/block overwriting and to only copy files if they are new or changed.
  • Unzip/Untar compressed folders after downloading them.
  • Repath files as you move them.
  • Complex filtering and ordering of files - by path, age, size etc. Pattern matching with regular expressions.
  • Leverage Prefect.IO built in scheduling and orchestration capabilities:
    • Transfer files on complex cron schedules
    • notifications on success/failure - slack, email, etc
    • Highly available server architecture - database server + multi-node workers and front ends.
  • Available as a PyPi package for integration into existing self hosted and cloud prefect deployments, and as a docker image/appiance

Example use cases:

  • Once per day SSH into my database server and copy the latest *.bkup file to a central storage location.
  • Monitor a local network share directory for new files and automatically upload them to a cloud storage bucket.
  • Schedule a weekly job to synchronize files between two remote servers.
  • Move log files from a SSH available web server older than 30 days to a cold storage location, then delete the originals.
  • Copy file yyyy-MM-dd.zip from a remote server, where yyyy-MM-dd matches todays date, to a local directory and then unzip it.
  • Download any file in an S3 bucket larger than 1GB and store it in a local directory.
  • Delete temporary files older than 7 days from a remote server to free up disk space.

Visit the full docs here.

Installation - Local

Install prefect-managedfiletransfer with pip. (Requires an installation of Python 3.11+.)

pip install prefect-managedfiletransfer
# or 
uv add prefect-managedfiletransfer

We recommend using a Python virtual environment manager such as uv, pipenv, conda or virtualenv.

In one (venv) terminal start a prefect server with logs enabled

export PREFECT_LOGGING_LEVEL="INFO"
export PREFECT_LOGGING_EXTRA_LOGGERS="prefect_managedfiletransfer"
prefect server start
# OR uv run prefect server start

There are many ways to manage infrastructure and code with prefect - here we demonstate starting a local worker:

export PREFECT_API_URL=http://127.0.0.1:4200/api
# or perhaps export PREFECT_API_URL=http://host.docker.internal:4200/api
export PREFECT_LOGGING_EXTRA_LOGGERS="prefect_managedfiletransfer"
export PREFECT_LOGGING_LEVEL="INFO"
# [Optional] add all logs: export PREFECT_LOGGING_ROOT_LEVEL="INFO"


prefect worker start --pool 'default-pool' --type process

# OR add a worker with config to spawn containers that can talk to the server API:
PREFECT_API_URL=http://host.docker.internal:4200/api uv run prefect worker start --pool 'default-pool' --type=docker  

Install the blocks using the prefect CLI

prefect block register -m prefect_managedfiletransfer

And then deploy the flows.

# deploy the flows to run locally
python -m prefect_managedfiletransfer.deploy --local

# OR deploy to run with a docker image - see deploy.py
python -m prefect_managedfiletransfer.deploy --docker

# or a version of the above using uv run:
uv run python -m prefect_managedfiletransfer.deploy --local
uv run python -m prefect_managedfiletransfer.deploy --docker

Visit the server UI http://localhost:4200.

  1. Create 2 blocks, one source and one destination
  2. On the deployments page start a transfer_files_flow. Configure your flow run to copy/move files between the 2 blocks.

Visit the full docs here. Note this a work in progress auto generated documentation site so it is not perfect.

Installation - docker

Run prefect managed file transfer in a docker container, like an applicance. See Docker hub for a list of images

Note this is ephemeral - prefect has lots of docs on how to setup a database server with it.

# run prefect server in a self-removing container port-forwarded to your local machine’s 4200 port:
docker run --rm -it -p 4200:4200 managedfiletransfer/prefect-managedfiletransfer:latest

Components

Flows

  • transfer_files_flow - a fully featured flow for transferring files between different storage locations. Supports copy and move modes.
  • upload_file_flow - a flow for uploading a file to a remote server. Supports pattern matching by date.
  • delete_files_flow - a flow for deleting files from a remote server based on pattern matching and filtering.

Blocks

  • ServerWithBasicAuthBlock - A block for connecting to a server using basic authentication.
  • ServerWithPublicKeyAuthBlock - A block for connecting to a server using public key authentication.
  • RCloneConfigFileBlock - A block for managing RClone configuration files.

Tasks

  • list_remote_files_task - A task for listing files in a remote directory.
  • download_file_task - A task for downloading a single file from a remote server.
  • upload_file_task - A task for uploading a single file to a remote server.
  • delete_file_task - A task for deleting a single file from a remote server.

Screenshot of transfer files flow

Feedback

If you encounter any bugs while using prefect-managedfiletransfer, feel free to open an issue in the prefect-managedfiletransfer repository.

Feel free to star or watch prefect-managedfiletransfer for updates too!

Contributing

If you'd like to help contribute to fix an issue or add a feature to prefect-managedfiletransfer, please propose changes through a pull request from a fork of the repository.

Here are the steps:

  1. Fork the repository
  2. Clone the forked repository
  3. Install the repository and its dependencies:
# install uv first, then
uv sync

You can also access all the prefect CLI tooling inside a uv managed venv

uv venv
source .venv/bin/activate
prefect server start
  1. Make desired changes
  2. Add tests
  3. Insert an entry to CHANGELOG.md
  4. Install pre-commit to perform quality checks prior to commit:
pre-commit install
  1. use the build script to run all the checks and tests:
./build.sh
  1. Use ./run_local.sh to deploy a local prefect server, worker, and UI to test your changes
  2. git commit, git push, and create a pull request

Metadata

Release files for prefect-managedfiletransfer 0.7.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 prefect-managedfiletransfer 0.7.1
File Size Uploaded Provenance
prefect_managedfiletransfer-0.7.1.tar.gz 90.1 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for prefect-managedfiletransfer 0.7.1
File Interpreter ABI Platform
prefect_managedfiletransfer-0.7.1-py3-none-any.whl Python 3 none any Details

Total release size: 180.8 MB

Release files / prefect_managedfiletransfer-0.7.1.tar.gz

Download URL prefect_managedfiletransfer-0.7.1.tar.gz
Size 90.1 MB
Tags Source
SHA-256 checksum
How to use checksums
1504422e377bf461fea6e136abf34354ecf7da058856b2032a09c1de6ea7e7df
BLAKE2b-256 checksum
How to use checksums
69207e20833c3e7e223969b931d6008630aececa74439b2dbc21356989133a5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Release files / prefect_managedfiletransfer-0.7.1-py3-none-any.whl

Download URL prefect_managedfiletransfer-0.7.1-py3-none-any.whl
Size 90.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
761b4c3eab73d600567aea8f72f7fc0449e6821ffd4cd4a3a7255da23be62273
BLAKE2b-256 checksum
How to use checksums
068b74d010d6ade13acee78d4fbde09c7e0c74b23c8963473948e3e746c3046e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Security for prefect-managedfiletransfer 0.7.1

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for prefect_managedfiletransfer-0.7.1.tar.gz

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 Oct 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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