A description of your project
Project description
villaInventorySdk
read and write inventory in real time
Install
pip install villaInventorySdk
How to use
Uploading a large amount of data
input = [
{'ib_brcode': '1023',
'ib_cf_qty': '835',
'ib_prcode': '84621',
'new_ib_vs_stock_cv': '839'},
{'ib_brcode': '1022',
'ib_cf_qty': '24',
'ib_prcode': '12424',
'new_ib_vs_stock_cv': '21'}
]
from villaInventorySdk.inventory import InventorySdk
from random import randrange
import boto3
from dataclasses import dataclass
from dataclasses_json import dataclass_json
from datetime import datetime
t0 = datetime.now()
print(f'uploading {len(input)} items')
sdk = InventorySdk(user=USER, pw=PW)
result = sdk.updateWithS3(
input,
inputBucketName= 'input-bucket-dev-manual',
functionName= 'update-inventory-s3-dev-manual',
invocationType = 'RequestResponse'
)
dt = datetime.now()-t0
print(f'it took {dt.seconds} s')
uploading 2 items
data was saved to s3
data is saved to s3, invoking ingestion function
input to lambda is {'inputBucketName': 'input-bucket-dev-manual', 'inputKeyName': 'input-data-name'}
it took 3 s
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
villaInventorySdk-0.0.7.tar.gz
(11.5 kB
view hashes)
Built Distribution
Close
Hashes for villaInventorySdk-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cac110b5330c81a3a423b0cc5264b6548e8f4306ba51b73bd1de987377c1ab32 |
|
MD5 | 55d628a5ac86829ef1eb7a3d94999133 |
|
BLAKE2b-256 | 5f9dc77391d504de592aa3113c9c3e8589549412dca5c83b0f245f816213ce03 |