Skip to main content

villaInventorySdk

Install

pip install villaInventorySdk

How to use

Uploading a large amount of data

sample input

sampleInput = [ 
  {'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'}
]

Upload data

init sdk

%%time
sdk = InventorySdk(user=USER, pw=PW, branchName = branch)
CPU times: user 36.6 ms, sys: 4.73 ms, total: 41.3 ms
Wall time: 1.05 s

Update inventory

%%time
sdk.updateWithS3( sampleInput )
CPU times: user 53.4 ms, sys: 2.56 ms, total: 55.9 ms
Wall time: 322 ms





{'body': 'true', 'statusCode': 200, 'header': {}}

Query single product

%%time
sdk.querySingleProduct('0000002')
CPU times: user 6.71 ms, sys: 7.73 ms, total: 14.4 ms
Wall time: 83.5 ms





{'ib_prcode': '0000002',
 '1000': {'ib_cf_qty': 35,
  'new_ib_bs_stock_cv': 33,
  'lastUpdate': 1600567810.529301,
  'ib_prcode': '0000002',
  'ib_brcode': '1000'},
 '1001': {'ib_cf_qty': 32,
  'new_ib_bs_stock_cv': 30,
  'lastUpdate': 1600567810.529316,
  'ib_prcode': '0000002',
  'ib_brcode': '1001'},
 '1002': {'ib_cf_qty': 34,
  'new_ib_bs_stock_cv': 30,
  'lastUpdate': 1600567810.529318,
  'ib_prcode': '0000002',
  'ib_brcode': '1002'},
 'lastUpdate': 1600567810.529318}

Query Branch

%%time
result = sdk.queryBranch('1000')
#showing the first 2 result
list(iter(result.items()))[:2]
CPU times: user 360 ms, sys: 28.1 ms, total: 388 ms
Wall time: 600 ms





[('0000009',
  {'ib_cf_qty': 50,
   'new_ib_bs_stock_cv': 27,
   'lastUpdate': 1602338504.869655,
   'ib_prcode': '0000009',
   'ib_brcode': '1000'}),
 ('0000002',
  {'ib_cf_qty': 35,
   'new_ib_bs_stock_cv': 33,
   'lastUpdate': 1600567810.529301,
   'ib_prcode': '0000002',
   'ib_brcode': '1000'})]

Query All

%%time
result = sdk.queryAll()
list(iter(result.items()))[:2]
CPU times: user 2.34 s, sys: 90.4 ms, total: 2.43 s
Wall time: 2.77 s





[('0000009',
  {'ib_prcode': '0000009',
   '1000': {'ib_cf_qty': 50,
    'new_ib_bs_stock_cv': 27,
    'lastUpdate': 1602338504.869655,
    'ib_prcode': '0000009',
    'ib_brcode': '1000'},
   'lastUpdate': 1602338504.869655}),
 ('0000002',
  {'ib_prcode': '0000002',
   '1000': {'ib_cf_qty': 35,
    'new_ib_bs_stock_cv': 33,
    'lastUpdate': 1600567810.529301,
    'ib_prcode': '0000002',
    'ib_brcode': '1000'},
   '1001': {'ib_cf_qty': 32,
    'new_ib_bs_stock_cv': 30,
    'lastUpdate': 1600567810.529316,
    'ib_prcode': '0000002',
    'ib_brcode': '1001'},
   '1002': {'ib_cf_qty': 34,
    'new_ib_bs_stock_cv': 30,
    'lastUpdate': 1600567810.529318,
    'ib_prcode': '0000002',
    'ib_brcode': '1002'},
   'lastUpdate': 1600567810.529318})]

Metadata

Release files for villaWalletDatabase 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for villaWalletDatabase 0.0.3
File Size Uploaded Provenance
villaWalletDatabase-0.0.3.tar.gz 14.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for villaWalletDatabase 0.0.3
File Interpreter ABI Platform
villaWalletDatabase-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 28.9 kB

Release files / villaWalletDatabase-0.0.3.tar.gz

Download URL villaWalletDatabase-0.0.3.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
56a8f1349aea07014a1521f12a9356957c129c45aba7059baf89ea7ad7f5d7d6
BLAKE2b-256 checksum
How to use checksums
b55700859cb0dbd0d5ee81d8f0bb7ffcbead904ed0bc8632cd9b827cec87aa32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20201009 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

Release files / villaWalletDatabase-0.0.3-py3-none-any.whl

Download URL villaWalletDatabase-0.0.3-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f0f0bddb38d0bcac0ba9fd16ffb90add3144f96ae42e4c9d33826b7277147ef2
BLAKE2b-256 checksum
How to use checksums
fb1e524d97f58c9ec8c35c8192ab128f3e5081e8c103120a76f525a2e87a33e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20201009 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

Security for villaWalletDatabase 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page