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
-
Locate
common_data.py: Open the SDK project directory on an IDE and navigate to thecommon_data.pyfile located attests/common/common_data.py. -
Update
get_request_token_dtofunction: Within thecommon_data.pyclass, locate the method namedget_request_token_dtoand update it with the credentials you were provided. -
Provide Credential Values: Populate the mandatory fields (
clientId,clientSecret,redirectUri, andWebcommenderUrl) within theRequestTokenDTOobject. 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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edf1fbd141898d9a8d49022e826ac4b43938234d50dec61746707efb6c6cc450
|
|
| MD5 |
f79394074754d4ef08c828d7133366b8
|
|
| BLAKE2b-256 |
58cfc67b652fb33e190229d11721cdd1a0794d14e64b3a28892288b014d3006b
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
276c7aa30d720694c2567f3cdeaa6fed98807904454d3a3e6c1c24dec65bc637
|
|
| MD5 |
d5ea2dc0421c3d87f968ba777a1d6129
|
|
| BLAKE2b-256 |
29dbc30b61a539e1c0af9ceb5fd6e4128cdce16a339f43da294438be67b22011
|