Skip to main content

Um pacote para processamento em lote usando MongoDB

Project description

Batch Processor Custom

This package provides an efficient solution for batch processing of data in MongoDB collections. It enables reading, locking, processing, and unlocking records in batches, facilitating the management and scalable processing of large data volumes.

Features

  • Configurable connection to any MongoDB instance.
  • Efficient handling of record locking and unlocking to ensure data integrity during batch processing.
  • Ability to process batches of specified size, suitable for large-scale data operations.

Installation

You can install this package using pip:

pip install batch_processor_custom

## Usage


from batch_processor_custom import BatchProcessor

# Initialize the processor
processor = BatchProcessor('mongodb://localhost:27017', 'your_database', 'your_collection')

# Process batches
for batch_id, records in processor.process_batches(10, 100):
    print(f'Processing batch {batch_id}')
    # Here you can add your processing logic
    processor.unlock_records([record['_id'] for record in records])

##License

This project is licensed under the MIT License - see the LICENSE file for details.

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

batch_processor_custom-0.1.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

batch_processor_custom-0.1.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file batch_processor_custom-0.1.0.tar.gz.

File metadata

  • Download URL: batch_processor_custom-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.1

File hashes

Hashes for batch_processor_custom-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4c858bfbf052a3eb79b2bbe468af7dfb6eea6019dea1f873c925d29bf3e4b161
MD5 beeea5b826c2737874108d39deaeb52b
BLAKE2b-256 71f1bcfd758d4be0ca2d64731dcecc66c3f85df56aedf28fe4d9cf50b1cee489

See more details on using hashes here.

File details

Details for the file batch_processor_custom-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for batch_processor_custom-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46d26565526d816ccf3c3c6b38de3d2e7d770f60a2733ab925cf1d0884675635
MD5 7361d58b0d8130c558a0fb6e32814ce9
BLAKE2b-256 30023b153c449646783df442f9d58868001cc6ba379675be7845692aff687127

See more details on using hashes here.

Supported by

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