Python package for managing bulk file CRUD operations.
Project description
BulkFileOperationsManager
BulkFileOperationsManager
is a Python tool designed to manage and execute bulk Create, Read, Update, and Delete (CRUD) operations on files, especially useful for handling large files that need to be processed in chunks to fit into memory constraints.
Installation
To install BulkFileOperationsManager
, you can use pip:
pip install BulkFileOperationsManager
Usage
As a Python Module
BulkFileOperationsManager
can be used as a Python module in your scripts for orchestrating bulk file operations.
Adding and Executing Tasks
from bulkfileoperationsmanager.bulk_operations_manager import BulkOperationsManager
from filechunkcrud import FileHandler
# Initialize the manager
manager = BulkOperationsManager()
# Example of adding and executing a create task
file_path = '/path/to/your/largefile.txt'
manager.add_task(("create", file_path, "Initial content"))
manager.run()
# Example of adding and executing a read task with handler
def read_handler(chunk):
print(chunk) # or process the chunk
manager.add_task(("read", file_path, 1024, read_handler))
manager.run()
# Example of adding and executing an update task with content generator
def additional_data_generator():
yield "\nMore data...\n"
manager.add_task(("update", file_path, additional_data_generator()))
manager.run()
# Example of adding and executing a delete task
manager.add_task(("delete", file_path))
manager.run()
Features
- Manage Bulk Operations: Efficiently manage and execute multiple file operations in a queue-based system.
- Integration with FileChunkCRUD: Seamlessly integrates with FileChunkCRUD for handling large files in chunks.
- Supports CRUD operations: Supports creating, reading, updating, and deleting files, especially suitable for large files.
Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
License
This project is licensed under the MIT License.
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
Built Distribution
File details
Details for the file BulkFileOperationsManager-0.0.7.tar.gz
.
File metadata
- Download URL: BulkFileOperationsManager-0.0.7.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1ccc68a6279d11db50d3c65cd1a46076bf20bc27c977e73b30876674b453382 |
|
MD5 | 9bb3d1792d5d9f9abd908830dede1bee |
|
BLAKE2b-256 | e0423ea2a0f8ca896d44effa2946d93a1ee892062437a12d174688e924768bed |
File details
Details for the file BulkFileOperationsManager-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: BulkFileOperationsManager-0.0.7-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05c74b26708e3cd116cea6d6ecb4452c7c4074de848d9b5db7437ce78d046dcf |
|
MD5 | 8ecf781e3654c29592a6a5155ce7c82f |
|
BLAKE2b-256 | 2f3c91802b7775887617f28769ce2f7609d76029ac7a0d139c5dc1d0bacb439e |