High-performance, type-safe directory synchronization tool utilizing Python MP/MT, Pydantic validation, and structured logging.
- Hybrid Concurrency Architecture:
- Uses
multiprocessingfor CPU-intensive diff calculation. - Uses
multithreadingfor I/O-bound directory scanning, file transfer and deletion operations.
- Uses
- Type Safety & Validation: Configuration management is handled via Pydantic, ensuring strict schema validation and runtime type checking.
- Enterprise-Grade Observability: Replaces standard outputs with structured Logging for detailed auditing and easier debugging.
- Full CRUD Synchronization: Handles Copy, Update, Directory Creation, and Deletion.
- Dry-run: Using a special flag, it is possible to simulate synchronisation operations instead of actually performing them.
- Language: Python 3.11+
- Validation: Pydantic
- Concurrency:
multiprocessing,threading,concurrent.futures - Logging: Native Python
loggingmodule - Testing unittest framework
-
Open the Notebook in Google Colab: Open In Colab
-
To execute the tool:
- Instantiate the main class with your source/destination paths.
- Execute plan generation (a list of pending operations: Copy, Update, Delete, Mkdir)
- Invoke the execution method to apply the Action Plan.
This tool performs destructive actions (file deletion) to ensure source-destination mirroring. Use with caution.
Distributed under the MIT License. See LICENSE for more information.