A concurrent sync tool which works with multiple sources and targets.

Overview

Concurrent Sync

A concurrent sync tool which works similar to rsync. It supports syncing given sources with multiple targets concurrently.

Requirements

Python >= 3.8 is required. (CPython and PyPy are both supported)

Installation

Concurrent Sync can be either installed directly via pip:

pip install concurrent-sync

Or it can be installed from the source:

git clone https://github.com/simsekhalit/concurrent-sync.git
python3 -m pip install ./concurrent-sync

Manual

$ python3 -m csync --help
usage: csync [-h] [--max-memory MAX_MEMORY] [--target TARGET] SOURCE [SOURCE ...] TARGET

A concurrent sync tool which works similar to rsync. It supports syncing given sources with multiple targets concurrently.

positional arguments:
  SOURCE                specify source directories/files
  TARGET                specify target directory

optional arguments:
  -h, --help            show this help message and exit
  --max-memory MAX_MEMORY
                        specify allowed max memory usage as percent
  --target TARGET       specify additional target directories

For more information: https://github.com/simsekhalit/concurrent-sync

Concurrent Sync takes one or more source paths and one or more target paths as arguments. All the given source paths are synced with each given target path concurrently.

  • Only the missing or changed files are copied from source to target.
  • While checking if a file is changed, its modification time and size are used similar to rsync.
  • Trailing slash at the end of the source is interpreted in a similar way to rsync.


Following Examples section clarifies the working mechanics in a more clear way.

Examples

1. One source path and one target path are given

Source

/mnt/Source
/mnt/Source/File1
/mnt/Source/File2
/mnt/Source/Folder1
/mnt/Source/Folder2
/mnt/Source/Folder2/File3

Target

/mnt/Target

Following command is executed:

python3 -m csync /mnt/Source /mnt/Target

After the sync is completed, target becomes:

/mnt/Target
/mnt/Target/Source
/mnt/Target/Source/File1
/mnt/Target/Source/File2
/mnt/Target/Source/Folder1
/mnt/Target/Source/Folder2
/mnt/Target/Source/Folder2/File3

2. Two source paths and one target are given

Source 1

/mnt/Source1
/mnt/Source1/File1
/mnt/Source1/File2

Source 2

/mnt/Source2
/mnt/Source2/File3
/mnt/Source2/File4

Target

/mnt/Target

Following command is executed:

python3 -m csync /mnt/Source1 /mnt/Source2 /mnt/Target

After the sync is completed, target becomes:

/mnt/Target
/mnt/Target/Source1
/mnt/Target/Source1/File1
/mnt/Target/Source1/File2
/mnt/Target/Source2
/mnt/Target/Source2/File3
/mnt/Target/Source2/File4

3. Source with trailing slash and target are given

Source

/mnt/Source
/mnt/Source/File1
/mnt/Source/File2

Target

/mnt/Target

Following command is executed:

python3 -m csync /mnt/Source/ /mnt/Target

After the sync is completed, target becomes:

/mnt/Target
/mnt/Target/File1
/mnt/Target/File2

4. Source and target with common paths

While syncing subdirectories of source paths with target paths, redundant files/folders are removed.

Source

/mnt/Source
/mnt/Source/Folder
/mnt/Source/Folder/File1
/mnt/Source/Folder/File2

Target

/mnt/Target
/mnt/Target/Source
/mnt/Target/Source/Folder
/mnt/Target/Source/Folder/File3

Following command is executed:

python3 -m csync /mnt/Source /mnt/Target

After the sync is completed, target becomes:

/mnt/Target
/mnt/Target/Source
/mnt/Target/Source/Folder
/mnt/Target/Source/Folder/File1
/mnt/Target/Source/Folder/File2

Since File3 is no longer in the source path it's deleted from the target as well.

5. One source path and two target paths are given

Source

/mnt/Source
/mnt/Source/File1
/mnt/Source/File2

Target 1

/mnt/Target1

Target 2

/mnt/Target2

Following command is executed:

python3 -m csync /mnt/Source /mnt/Target1 --target /mnt/Target2

After the sync is completed, targets become:

Target 1

/mnt/Target1
/mnt/Target1/Source
/mnt/Target1/Source/File1
/mnt/Target1/Source/File2

Target 2

/mnt/Target2
/mnt/Target2/Source
/mnt/Target2/Source/File1
/mnt/Target2/Source/File2
You might also like...
The purpose of this tool is to check RDP capabilities of a user on specific targets.

RDPChecker The purpose of this tool is to check RDP capabilities of a user on specific targets. Programming concept was taken from RDPassSpray and thu

PrimaryBid - Transform application Lifecycle Data and Design and ETL pipeline architecture for ingesting data from multiple sources to redshift
PrimaryBid - Transform application Lifecycle Data and Design and ETL pipeline architecture for ingesting data from multiple sources to redshift

Transform application Lifecycle Data and Design and ETL pipeline architecture for ingesting data from multiple sources to redshift This project is composed of two parts: Part1 and Part2

 sync application configuration and settings across multiple multiplatform devices
sync application configuration and settings across multiple multiplatform devices

sync application configuration and settings across multiple multiplatform devices ✨ Key Features • ⚗️ Installation • 📑 How To Use • 🤔 FAQ • 🛠️ Setu

One package to access multiple different data sources through their respective API platforms.

BESTLab Platform One package to access multiple different data sources through their respective API platforms. Usage HOBO Platform See hobo_example.py

Using multiple API sources, create an app that allows users to filter through random locations based on their temperature range choices.
Using multiple API sources, create an app that allows users to filter through random locations based on their temperature range choices.

World_weather_analysis Overview Using multiple API sources, create an app that allows users to filter through random locations based on their temperat

Transparent proxy server that works as a poor man's VPN. Forwards over ssh. Doesn't require admin. Works with Linux and MacOS. Supports DNS tunneling.

sshuttle: where transparent proxy meets VPN meets ssh As far as I know, sshuttle is the only program that solves the following common case: Your clien

Yuyu Scanner is a Web Reconnaissance & Web Analysis Scanner to find assets and information about targets.
Yuyu Scanner is a Web Reconnaissance & Web Analysis Scanner to find assets and information about targets.

Yuyu Scanner Yuyu Scanner is a Web Reconnaissance & Web Analysis Scanner to find assets and information about targets. installation ! run as root

 Alternative StdLib for Nim for Python targets
Alternative StdLib for Nim for Python targets

Alternative StdLib for Nim for Python targets, hijacks Python StdLib for Nim

Dumping revelant information on compromised targets without AV detection

DonPAPI Dumping revelant information on compromised targets without AV detection DPAPI dumping Lots of credentials are protected by DPAPI (link ) We a

Ip-Tracker: a script written in python for tracking Someone using targets ip-Tracker address

🔰 𝕀𝕡-𝕋𝕣𝕒𝕔𝕜𝕖𝕣 🔰 Ip-Tracker is a script written in python for tracking Someone using targets ip-Tracker address It was made by Spider Anongre

tox-gh is a tox plugin which helps running tox on GitHub Actions with multiple different Python versions on multiple workers in parallel

tox-gh is a tox plugin which helps running tox on GitHub Actions with multiple different Python versions on multiple workers in parallel. This project is inspired by tox-travis.

A library to make concurrent selenium tests that automatically download and setup webdrivers

AutoParaSelenium A library to make parallel selenium tests that automatically download and setup webdrivers Usage Installation pip install autoparasel

A wrapper around ffmpeg to make it work in a concurrent and memory-buffered fashion.

Media Fixer Have you ever had a film or TV show that your TV wasn't able to play its audio? Well this program is for you. Media Fixer is a program whi

SCOOP (Scalable COncurrent Operations in Python)
SCOOP (Scalable COncurrent Operations in Python)

SCOOP (Scalable COncurrent Operations in Python) is a distributed task module allowing concurrent parallel programming on various environments, from h

Fast as FUCK nvim completion. SQLite, concurrent scheduler, hundreds of hours of optimization.
Fast as FUCK nvim completion. SQLite, concurrent scheduler, hundreds of hours of optimization.

Fast as FUCK nvim completion. SQLite, concurrent scheduler, hundreds of hours of optimization.

Simple package to enhance Python's concurrent.futures for memory efficiency

future-map is a Python library to use together with the official concurrent.futures module.

rosny is a lightweight library for building concurrent systems.

rosny is a lightweight library for building concurrent systems. Installation Tested on: Linux Python = 3.6 From pip: pip install rosny From source: p

Functional interface for concurrent futures, including asynchronous I/O.

Futured provides a consistent interface for concurrent functional programming in Python. It wraps any callable to return a concurrent.futures.Future,

A Python script that exports users from one Telegram group to another using one or more concurrent user bots.

ExportTelegramUsers A Python script that exports users from one Telegram group to another using one or more concurrent user bots. Make sure to set all

Owner
Halit Şimşek
Software Engineer at Atlassian, Opsgenie
Halit Şimşek
AnyIO is an asynchronous networking and concurrency library that works on top of either asyncio or trio.

AnyIO is an asynchronous networking and concurrency library that works on top of either asyncio or trio. It implements trio-like structured concurrenc

Alex Grönholm 1.1k Jan 06, 2023
Python Multithreading without GIL

Multithreaded Python without the GIL

Sam Gross 2.3k Jan 05, 2023
Ultra fast asyncio event loop.

uvloop is a fast, drop-in replacement of the built-in asyncio event loop. uvloop is implemented in Cython and uses libuv under the hood. The project d

magicstack 9.1k Jan 07, 2023
SCOOP (Scalable COncurrent Operations in Python)

SCOOP (Scalable COncurrent Operations in Python) is a distributed task module allowing concurrent parallel programming on various environments, from h

Yannick Hold 573 Dec 27, 2022
Trio – a friendly Python library for async concurrency and I/O

Trio – a friendly Python library for async concurrency and I/O The Trio project aims to produce a production-quality, permissively licensed, async/awa

5k Jan 07, 2023
Thread-safe asyncio-aware queue for Python

Mixed sync-async queue, supposed to be used for communicating between classic synchronous (threaded) code and asynchronous

aio-libs 665 Jan 03, 2023
A Python package for easy multiprocessing, but faster than multiprocessing

MPIRE, short for MultiProcessing Is Really Easy, is a Python package for multiprocessing, but faster and more user-friendly than the default multiprocessing package.

753 Dec 29, 2022
aiomisc - miscellaneous utils for asyncio

aiomisc - miscellaneous utils for asyncio Miscellaneous utils for asyncio. The complete documentation is available in the following languages: English

aiokitchen 295 Jan 08, 2023
Unsynchronize asyncio by using an ambient event loop, or executing in separate threads or processes.

unsync Unsynchronize asyncio by using an ambient event loop, or executing in separate threads or processes. Quick Overview Functions marked with the @

Alex Sherman 802 Dec 28, 2022
Jug: A Task-Based Parallelization Framework

Jug: A Task-Based Parallelization Framework Jug allows you to write code that is broken up into tasks and run different tasks on different processors.

Luis Pedro Coelho 387 Dec 21, 2022
Parallelformers: An Efficient Model Parallelization Toolkit for Deployment

Parallelformers: An Efficient Model Parallelization Toolkit for Deployment

TUNiB 559 Dec 28, 2022
Backport of the concurrent.futures package to Python 2.6 and 2.7

This is a backport of the concurrent.futures standard library module to Python 2. It does not work on Python 3 due to Python 2 syntax being used in th

Alex Grönholm 224 Nov 07, 2022
A curated list of awesome Python asyncio frameworks, libraries, software and resources

Awesome asyncio A carefully curated list of awesome Python asyncio frameworks, libraries, software and resources. The Python asyncio module introduced

Timo Furrer 3.8k Jan 08, 2023
A lightweight (serverless) native python parallel processing framework based on simple decorators and call graphs.

A lightweight (serverless) native python parallel processing framework based on simple decorators and call graphs, supporting both control flow and dataflow execution paradigms as well as de-centrali

102 Jan 06, 2023
Raise asynchronous exceptions in other thread, control the timeout of blocks or callables with a context manager or a decorator

stopit Raise asynchronous exceptions in other threads, control the timeout of blocks or callables with two context managers and two decorators. Attent

Gilles Lenfant 97 Oct 12, 2022
rosny is a lightweight library for building concurrent systems.

rosny is a lightweight library for building concurrent systems. Installation Tested on: Linux Python = 3.6 From pip: pip install rosny From source: p

Ruslan Baikulov 6 Oct 05, 2021
Simple package to enhance Python's concurrent.futures for memory efficiency

future-map is a Python library to use together with the official concurrent.futures module.

Arai Hiroki 2 Nov 15, 2022
🌀 Pykka makes it easier to build concurrent applications.

🌀 Pykka Pykka makes it easier to build concurrent applications. Pykka is a Python implementation of the actor model. The actor model introduces some

Stein Magnus Jodal 1.1k Dec 30, 2022
A concurrent sync tool which works with multiple sources and targets.

Concurrent Sync A concurrent sync tool which works similar to rsync. It supports syncing given sources with multiple targets concurrently. Requirement

Halit Şimşek 2 Jan 11, 2022