Visit Main Site
Join Partner Program
Login
     
Introduction
Installation
Python
Documentation
Category
Products
Carts
Variations
Currency
Tax
Tax Profile
Tax Rule
Tax Code
Tax Zone
Discount
Shipping
Shipping Profile
Shipping Rate
Shipping Rules
Customer
Orders
Blog
Settings
» WebCommander Python SDK Installation Guide

WebCommander Python SDK Installation Guide

Setting Up the WebCommander SDK Project

Clone WebCommander from Github

SHELL
# Clone the repository
git clone https://github.com/WebCommanderCMS/wc_python_sdk.git

# Navigate into the project directory
cd wc_python_sdk

# Install dependencies
pip install -r requirements.txt

Configuration and Authentication for WebCommander SDK

Gather Credentials

You will need the following credentials to configure the WebCommander SDK:

  • WebCommander Url
  • Grant Type
  • Auth String
  • Client Id
  • Client Secret
  • Redirect Uri

If you do not have these, contact your designated client representative.

Configure Credentials

Update common_data.py

The common_data.py file is available in the GitHub repository. Users only need to add their credentials and use it.

Modify the file located at tests/common/common_data.py to include the following authentication setup:

PYTHON
from wc_py.webcommander.auth.dto.token_dto import RequestTokenDTO

class CommonData:
    @staticmethod
    def get_request_token_dto():
        return RequestTokenDTO(
            webCommanderUrl="WEB_COMMANDER_URL",
            grantType="GRANT_TYPE",
            authString="AUTH_STRING",
            clientId="CLIENT_ID",
            clientSecret="CLIENT_SECRET",
            redirectUri="REDIRECT_URI"
        )

Credentials Table

Placeholder
Description
WEB_COMMANDER_URL
The base URL of the WebCommander server.
GRANT_TYPE
The OAuth 2.0 grant type used for authentication.
AUTH_STRING
The Base64-encoded authentication string containing client credentials.
CLIENT_ID
The unique identifier assigned to the client application.
CLIENT_SECRET
The secret key associated with the client ID for secure authentication.
REDIRECT_URI
The callback URL where authentication responses will be sent.

Troubleshooting Tips

Incorrect Credentials

Ensure your Client ID, Client Secret, and Redirect URL are correct.

Virtual Environment

If activation fails, ensure the virtual environment was created in the correct folder.

Terms and Conditions
Privacy Policy

© 2024 WebCommander | All Rights Reserved

contact@webcommander.com
1300 797 571

WebCommander
About Us
Features
Pricing
Compare
Partners
Contact Us
Resource
Find a Partner
Help Centre
Community
Blog
Solutions
Inventory Management
Omnichannel Sales
Ecommerce Automation
B2B Ecommerce
Headless Commerce
Website Design and Performance