Batch functionality for Azure Table Storage
Project description
Microsoft Azure CosmosDB Table SDK for Python with batching functionality
This project provides a wrapper for the Azure cosmosdb TableService.
For documentation on this package please see the Microsoft Azure CosmosDB Table SDK for Python
_ page.
Features
-
Table
- Automatically split lists of entities into batches based on PartitionKey
- Automatically chunk entities into sub-lists for correct batch sizes
- Batch Insert Entities
- Batch Update Entities
- Batch Merge Entities
- Batch Delete Entities
- Batch Insert or Replace Entities
- Batch Insert or Merge Entities
Getting Started
To install via the Python Package Index (PyPI), type:
pip install batch-table-storage
Minimum Requirements
- azure-cosmosdb-table==1.0.6
Code Sample
Import the wrapper class
from batch_table_service import BatchTableService
Instantiate the service
service = BatchTableService(account_name='storageAccount', account_key='x')
Create some entities
entities = [
{'PartitionKey': 'person', 'RowKey': '1', 'name': 'John'},
{'PartitionKey': 'pet', 'RowKey': '1', 'name': 'Cat'}
]
Create and commit the batches:
service.batch_insert_entities(table_name='tableA', entities=entities)
Learn More
.. _Microsoft Azure CosmosDB Table SDK for Python: https://pypi.org/project/azure-cosmosdb-table/
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
Close
Hashes for batch_table_storage-0.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a3962c932e08030b0d1ecd752a82085c50678643fb3a58e55070215a43f407d |
|
MD5 | 9e49cb30986c06e4502fe4bb880fb517 |
|
BLAKE2b-256 | 84625af7a78d4dfb20f85fa6f653ccb3fcb437f16ebfd8afb85333a96660d9c5 |
Close
Hashes for batch_table_storage-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 959235c4187b992c8e44313bbd32932df544ad1f8810c56b2a63e0e917101e04 |
|
MD5 | 9de27389a7b37c289a6a321d60b72fff |
|
BLAKE2b-256 | 9fae276259c3e7a4faf62a9b808ca4af059afbb0f4209816d204623587c88a0d |