Skip to main content

Python package for managing bulk file CRUD operations.

Project description

PyPI version License: MIT Downloads

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

BulkFileOperationsManager-0.0.7.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page