Skip to main content

SDK for villa e-commerce Backend

postman Terminal file

Full Documentation Here

How to use

  1. Create a bucket
  2. fill in the products
  3. modify the quantity and update products
  4. trigger conversion to cart referencing a bucket

SDK docs

from villaBackendSdk.basket import BasketSdk
basketSdk = BasketSdk(branch='dev')
inputDict = {
    "basketId" : "1234",
    "basketName" : "1234",
    "ownerId" : "1234"
}
basketSdk.create(inputDict)
{'body': '{"result":{"basketId":"1234","creationTime":1605790015.917538,"basketName":"1234","ownerId":"1234","productList":[]},"Metadata":{"ConsumedCapacity":{"TableName":"basket-table-dev","CapacityUnits":3.0}}}',
 'statusCode': 200,
 'headers': {}}
inputDict = {
    'basketId': '1234',
    'items': [{'sku':'123','quantity':-123},{'sku':'456','quantity':123}],
  }
basketSdk.add(inputDict)
{'body': '{"basketId":"1234","creationTime":1605790015.917538,"basketName":"1234","ownerId":"1234","productList":[{"sku":"456","quantity":123}]}',
 'statusCode': 200,
 'headers': {}}
inputDict = {
    'basketId': '1234',
    'basketName': 'test',
    'ownerId': '1234',
    'items': [{'sku':'123234','quantity':123},{'sku':'456','quantity':123}]
  }
basketSdk.update(inputDict)
{'body': '{"basketId":"1234","creationTime":1605790015.917538,"basketName":"1234","ownerId":"1234","productList":[{"sku":"123234","quantity":123},{"sku":"456","quantity":123}]}',
 'statusCode': 200,
 'headers': {}}
inputDict = {
    'basketId': '1234',
  }
basketSdk.get(inputDict)
{'body': '{"basketId":"1234","creationTime":1605790015.917538,"basketName":"1234","ownerId":"1234","productList":[{"sku":"123234","quantity":123},{"sku":"456","quantity":123}]}',
 'statusCode': 200,
 'headers': {}}
inputDict = {
    'basketId': '1234'
  }
basketSdk.empty(inputDict)
{'body': '{"basketId":"1234","creationTime":1605790015.917538,"basketName":"1234","ownerId":"1234","productList":[]}',
 'statusCode': 200,
 'headers': {}}
inputDict = {
    'basketId': '1234'
  }
basketSdk.remove(inputDict)
{'body': '{"basketDeleted":{"basketId":"1234","creationTime":1605790015.917538,"basketName":"1234","ownerId":"1234","productList":[]}}',
 'statusCode': 200,
 'headers': {}}

Metadata

Release files for villaBackendSdk 0.0.1

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

Source distribution (sdist)

Source distribution for villaBackendSdk 0.0.1
File Size Uploaded Provenance
villaBackendSdk-0.0.1.tar.gz 9.8 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 17.7 kB

Release files / villaBackendSdk-0.0.1.tar.gz

Download URL villaBackendSdk-0.0.1.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
56283baa576bac5d3d27acce1735c7628455e81342c11e8d1bdf529a06e7cccf
BLAKE2b-256 checksum
How to use checksums
2f224f5f0003350bd4147d710533e7d5b39e300d1bdd8d7d88c64cfe4d1e0766
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 / villaBackendSdk-0.0.1-py3-none-any.whl

Download URL villaBackendSdk-0.0.1-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f7c1d3155612f6ac5775e808931fa9e64cc0c8d3cfeb23a0c11ee39110827b37
BLAKE2b-256 checksum
How to use checksums
c83f7603a0efa74821e1b4c57c07b0282fcdc6417b252a795401e7d1de889017
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 villaBackendSdk 0.0.1

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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

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