Skip to main content

Webcommander SDK

Project description

Here’s your updated README.md with "Exsited" replaced by "Webcommender":

# Webcommender Python SDK
The Webcommender Python SDK provides an easy-to-use library for integrating Webcommender services into your project. This includes Custom Integration, Onsite Integration, and all APIs.

***
## Table of Contents
- [Requirements](#Requirements)
- [Installation](#Installation)
- [Configuration](#Configuration)
- [Authentication](#Authentication)
- [Getting Started](#Getting-Started)
- [Testing](#Testing)
- [API Documentation](#API-Documentation)
- [Usage charge_item_uuid Association](#Usage-charge_item_uuid-Association)

# Requirements
Python 3.12 and Later

# Installation
```bash
# Navigate to the project directory
cd webcommender-python

# Install virtualenv
pip install virtualenv

# Create Virtual Environment
python -m venv venv

# Activate virtual environment from Windows
venv\Scripts\activate

# Upgrade pip
python -m pip install --upgrade pip

# Install setup tools
pip install setuptools

# Install app dependencies
pip install -e .

# Usage association dependencies
pip install peewee
pip install mysql-connector-python

Configuration

To set up the Webcommender SDK, you'll require your Client ID, Client Secret, and Redirect URL. If you have not received these details already, please reach out to your designated client contact to obtain them.

Authentication

  1. Locate common_data.py: Open the SDK project directory on an IDE and navigate to the common_data.py file located at tests/common/common_data.py.

  2. Update get_request_token_dto function: Within the common_data.py class, locate the method named get_request_token_dto and update it with the credentials you were provided.

  3. Provide Credential Values: Populate the mandatory fields (clientId, clientSecret, redirectUri, and WebcommenderUrl) within the RequestTokenDTO object. However, replace the placeholder values in the following code block with your actual credentials:

Code Example:

def get_request_token_dto():
    return RequestTokenDTO(
            webCommanderUrl="[YOUR_WEBCOMMANDER_URL]",
            grantType="client_credentials",
            authString="[YOUR_AUTH_STRING]",
            clientId="[YOUR_CLIENT_ID]",
            clientSecret="[YOUR_CLIENT_SECRET]",
            redirectUri="[YOUR_REDIRECT_URI]"
        )

Credentials Table

Key Value
clientId "[YOUR_CLIENT_ID]"
clientSecret "[YOUR_CLIENT_SECRET]"
redirectUri "[YOUR_REDIRECT_URI]"
webCommanderUrl "[YOUR_WEBCOMMANDER_URL]"
grantType "client_credentials"
authString "[YOUR_AUTH_STRING]"

Getting Started

Follow the common pattern to test the functions in the SDK. All tests can be found in the "Tests" directory.

Testing SDK Functions

Example Method 1: product_get_list_test


### Function Signature
```Python
def product_get_list_test():
    webcommander_sdk: WebCommanderSDK = WebCommanderSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        response = webcommander_sdk.product.list()
        print(response)
    except WCException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

webcommander-1.0.0.tar.gz (28.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

webcommander-1.0.0-py3-none-any.whl (54.8 kB view details)

Uploaded Python 3

File details

Details for the file webcommander-1.0.0.tar.gz.

File metadata

  • Download URL: webcommander-1.0.0.tar.gz
  • Upload date:
  • Size: 28.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for webcommander-1.0.0.tar.gz
Algorithm Hash digest
SHA256 edf1fbd141898d9a8d49022e826ac4b43938234d50dec61746707efb6c6cc450
MD5 f79394074754d4ef08c828d7133366b8
BLAKE2b-256 58cfc67b652fb33e190229d11721cdd1a0794d14e64b3a28892288b014d3006b

See more details on using hashes here.

File details

Details for the file webcommander-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: webcommander-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 54.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for webcommander-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 276c7aa30d720694c2567f3cdeaa6fed98807904454d3a3e6c1c24dec65bc637
MD5 d5ea2dc0421c3d87f968ba777a1d6129
BLAKE2b-256 29dbc30b61a539e1c0af9ceb5fd6e4128cdce16a339f43da294438be67b22011

See more details on using hashes here.

Supported by

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