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.0b16.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

vtexpy-0.0.0b16-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vtexpy-0.0.0b16.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for vtexpy-0.0.0b16.tar.gz
Algorithm Hash digest
SHA256 42a73e7862d38d8b7fa14ef64a82707f1c41898cbad1f6ddba86d55d3b38d91b
MD5 48b02ae3703969270aa257b37eaf08d7
BLAKE2b-256 3da5cc5358aa64fc477334f63af985b661ac31d46f9f6fa6a67cdfc046261160

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vtexpy-0.0.0b16-py3-none-any.whl
  • Upload date:
  • Size: 27.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for vtexpy-0.0.0b16-py3-none-any.whl
Algorithm Hash digest
SHA256 bc3371553fb988012e04c1925a74600e13c09b78778148802cf117a238a19a8b
MD5 0dfb083e0be1e6c749e482b644d952e9
BLAKE2b-256 dad74b4e93ba66c9da309bb0f58c565c4b0c32a4a424a5de7d92ec24efc1319a

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