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.1.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.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: batch_processor_custom-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 e14dd4e0dd4d62cb24d15b7ad53841b82e8c1fb376bc610952adaf6e5ab53e87
MD5 7c0a48f79ab778cf8e6485dad209d6d7
BLAKE2b-256 a34f8a613f4b88cf8ec61be8ff4182aaa00d93c885f29d602d9d1a1256867275

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for batch_processor_custom-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b4446802537a7aa0fd2edc6de5006a8319070ec7e926d16b87e9eaa11be2724c
MD5 228fe48c1a8f972f75abbfd6cf01f0c0
BLAKE2b-256 c6869ab9ef74f5d699a08ca51e3928dd27cbef98e49ff0a2a1d7d307f5e6f2a1

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