https://github.com/yevheniidatsenko/goit-pythonweb-hw-04
📂 Hometask - FullStack Web Development with Python (Asynchronous Programming in Python)
https://github.com/yevheniidatsenko/goit-pythonweb-hw-04
aiofiles asyncio goit-pythonweb-hw-04 python
Last synced: 7 months ago
JSON representation
📂 Hometask - FullStack Web Development with Python (Asynchronous Programming in Python)
- Host: GitHub
- URL: https://github.com/yevheniidatsenko/goit-pythonweb-hw-04
- Owner: yevheniidatsenko
- Created: 2025-01-19T14:44:31.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-01-19T15:31:29.000Z (9 months ago)
- Last Synced: 2025-01-19T16:32:11.122Z (9 months ago)
- Topics: aiofiles, asyncio, goit-pythonweb-hw-04, python
- Language: Python
- Homepage:
- Size: 5.32 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Asynchronous Programming in Python
## Overview
This Python script sorts files from a specified source folder into subfolders in a destination folder based on their file extensions. The script performs the sorting asynchronously, making it efficient for processing a large number of files.
## Features
- Asynchronous reading and copying of files.
- Files are organized into subfolders based on their extensions.
- Command line argument handling for source and destination folders.
- Error logging for any issues encountered during processing.
- Complies with PEP 8 standards for readability.## Requirements
- Python 3.7 or higher
- `aiofiles` library for asynchronous file operations
- `colorama` library for colored console output (optional)## Installation
1. Clone the repository or download the script.
2. Install the required libraries using pip:```bash
pip install aiofiles colorama
```## Usage
Run the script from the command line with the following syntax:
```bash
python script_name.py --source --output
```### Arguments
- `--source`: Path to the source folder containing files to be sorted.
- `--output`: Path to the destination folder where sorted files will be placed.### Example
```bash
python file_sorter.py --source /path/to/source --output /path/to/destination
```## Error Handling
All errors encountered during the execution of the script are logged. Ensure to check the logs for any issues related to file copying or folder access.
## Results
