Skip to main content

Unofficial Python SDK for VTEX API

Project description

VTEXPY

PyPI Version

Unofficial Python SDK for VTEX API

VTEXPY is an unofficial Python SDK designed to facilitate integration with the VTEX API.

Even though it is still tagged as beta, vtexpy has been in use by a SaaS company in a production environment for over a year, making millions of requests a day to the VTEX API.

Features

  • Easy to use Python interface for calling endpoints on the VTEX API.
  • Custom exception handling
  • Automatic retries
  • Request logging

Getting Started

Requirements

  • Python >= 3.9, < 3.14
  • httpx >= 0.26, < 1.0
  • python-dateutil >= 2.9, < 3.0
  • tenacity >= 8.3, < 10.0

Installation

pip install vtexpy

Usage

If the API you want to call is not yet implemented, feel free to create an issue on the VTEXPY Github repository and request it to be added.

from vtex import VTEX

# 1 - Instantiate the VTEX client for the account you want to access:
vtex_client = VTEX(
    account_name="<ACCOUNT_NAME>", 
    app_key="<APP_KEY>", 
    app_token="<APP_TOKEN>",
)

# 2 - Call one of the available APIs, e.g.:
vtex_client.license_manager.get_account()
vtex_client.catalog.list_sku_ids(page=1, page_size=1000)
vtex_client.orders.list_orders(page=1, page_size=100)

# 3 - If the API you want to call is not yet implemented you can use the `custom` API.
vtex_client.custom.request(
    method="GET",
    environment="vtexcommercestable",
    endpoint="/api/catalog_system/pvt/commercialcondition/list",
)

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

vtexpy-0.0.0b12.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

vtexpy-0.0.0b12-py3-none-any.whl (26.8 kB view details)

Uploaded Python 3

File details

Details for the file vtexpy-0.0.0b12.tar.gz.

File metadata

  • Download URL: vtexpy-0.0.0b12.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.9.19 Darwin/23.6.0

File hashes

Hashes for vtexpy-0.0.0b12.tar.gz
Algorithm Hash digest
SHA256 3f1785f6ea88c8a982311538902a17f1aafae3b52322c5e070adeab7db31bc06
MD5 9590b25e3efca0b8ac17bccd89f8addb
BLAKE2b-256 403b084ed0183ef3e9b94eb6da6078bc284f1cfdc7852d59bed5d513ccdf5bc7

See more details on using hashes here.

File details

Details for the file vtexpy-0.0.0b12-py3-none-any.whl.

File metadata

  • Download URL: vtexpy-0.0.0b12-py3-none-any.whl
  • Upload date:
  • Size: 26.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.9.19 Darwin/23.6.0

File hashes

Hashes for vtexpy-0.0.0b12-py3-none-any.whl
Algorithm Hash digest
SHA256 89d83e841d54687b783db72b4fc8a5b5909e356ba575c81eecf6bb6c3471937d
MD5 57d9c541a7765785774bfa0c8584b0f8
BLAKE2b-256 e13d2f11a4519bbd80287775af2a6de09fc01bbeaba81e81bd5632897aee877b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page