Skip to main content

Move your data around

Project description

Python Version MIT License Coverage

Fluke Logo

What is Fluke?

Fluke is a Python package that is primarily to be used as a data transfer tool. By utilizing Fluke, moving your data between two remote locations can be done in just a matter of seconds from the comfort of your own machine!

Installation

You can start using Fluke by installing it via pip. Note that fluke requires Python >= 3.9.

pip install fluke-api

Usage Example

In this example, we are going to transfer an entire directory residing within a remote machine to the cloud, more specifically, to an Amazon S3 bucket.

First things first, we need to be able to authenticate with both the remote machine and AWS. In order to achieve this, we will be importing from fluke.auth:

from fluke.auth import RemoteAuth, AWSAuth

# This object will be used to authenticate
# with the remote machine.
rmt_auth = RemoteAuth.from_password(
    hostname="host",
    username="user",
    password="password")

# This object will be used to authenticate
# with AWS.
aws_auth = AWSAuth(
    aws_access_key_id="aws_access_key",
    aws_secret_access_key="aws_secret_key")

Next, we just need to import from fluke.storage so that we gain access to any necessary resources and perform the data transfer:

from fluke.storage import RemoteDir, AWSS3Dir

with (
    RemoteDir(auth=rmt_auth, path='/home/user/dir') as rmt_dir,
    AWSS3Dir(auth=aws_auth, bucket="bucket", path='dir', create_if_missing=True) as aws_dir
):
    rmt_dir.transfer_to(dst=aws_dir, recursively=True)

And that's basically it!

You can learn more about Fluke by visiting the Fluke Documentation Page.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fluke-api-0.2.0.tar.gz (35.9 kB view hashes)

Uploaded Source

Built Distribution

fluke_api-0.2.0-py3-none-any.whl (25.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page