Categories
Development DevOps Software Technology

PyClone released

While I’ve been working on Tiberium, which sits on top of many separate tools (such as rclone), I’ve had to end up writing interfaces for some of these tools. Today, I released PyClone which wraps rclone using the pexpect package and allows you to query transfer updates from the thread that’s responsible for running rclone.

An example for copying a large amount of data, and querying the results that are returned in a dictionary format:

#!/usr/bin/env python

import pyclone
import time

rclone    =    pyclone.PyClone()

rclone.sync(
    source    =    '/mnt/familyPhotos',
    remote    =    'googleDrive',
    path      =    '/backups/familyPhotos'
)

while rclone.tailing():

    if rclone.readline():
        print( rclone.line )

    time.sleep( 0.5 )

rclone.stop()

Did this article save you time or money? I'd love a coffee!

Did you find this useful?
Please share with those who you believe would find this useful too!

2 replies on “PyClone released”

This is insane.

I wanted to release Pyclone yesterday only to realize that I was not authorized to publish under that name, because someone halfway across the world had a similar idea.

I released it as pyclone-module, but I’m definitely renaming it now. I also wanted programmatic control over rclone for another project.

I checked the source of your project and I am very impressed at how thorough it is, I think it even meets my requirements.

God bless the python community

Hi Mwila, thank you for the incredibly kind words!

I need to go back through and make a graphic for it, but the thought process in naming it “PyClone” was a play on words of Python, Rclone, and cyclone.

I checked out your package, and it looks *GREAT*! I’m going to try and spend more time with your Python package over the weekend when I have time.

You might want to take a look at the examples if you haven’t: https://gitlab.com/ltgiv/pyclone/-/tree/master/examples

I have another update or two that I’ll be pushing for examples, and also need to add on a few more features that I feel are missing, but this initial release covers my needs for my “Tiberium” project (a DevOps tool) that I’ve been working on in my free time.

Leave a Reply

Your email address will not be published. Required fields are marked *