»
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.