No project description provided
Project description
WCFM ReST API Client
Installation
This library is distributed on pypi. In order to add it as a dependency, run the following command:
$ pip install wcfmclient
or
$ pip3 install wcfmclient
Prerequisite
This library is built in consideration with JWT Authentication for WP REST API. Make sure that you follow WCFM's official authentication setup here.
Using the client library
Instantiate an API object as shown below
from wcfmclient.api import API
from wcfmclient.jwt_auth_service import JWTAuthService
from wcfmclient.session import session
api = API(**{
"username": "vendor's username",
"password": "vendor's password",
"url": "https://your.domain.name",
"session": session
})
Authenticate with your store's server.
from wcfmclient.api import API
from wcfmclient.jwt_auth_service import JWTAuthService
from wcfmclient.session import session
api = API(**{
"username": "vendor's username",
"password": "vendor's password",
"url": "https://your.domain.name",
"session": session
})
jwt_auth_service = JWTAuthService(api)
jwt_auth_service.authenticate()
Consuming wcfm rest api.
from wcfmclient.api import API
from wcfmclient.jwt_auth_service import JWTAuthService
from wcfmclient.session import session
api = API(**{
"username": "vendor's username",
"password": "vendor's password",
"url": "https://your.domain.name",
"session": session
})
jwt_auth_service = JWTAuthService(api)
jwt_auth_service.authenticate()
res = api.get("wp-json/wcfmmp/v1/products/")
products = res.json()
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 wcfmclient-1.0.0.tar.gz.
File metadata
- Download URL: wcfmclient-1.0.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/2.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76d85298608d62784d6f39eef03fbaab0ceed8859c425c806edf9561a0d8c856
|
|
| MD5 |
8484bb91d46efc04a6a335142352c7dc
|
|
| BLAKE2b-256 |
939329ad82e2d49ce573367b569855095769413fc3f796da81164bcb5ebcfed3
|
File details
Details for the file wcfmclient-1.0.0-py2.py3-none-any.whl.
File metadata
- Download URL: wcfmclient-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/2.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5f187b0269700fd02e172351bf8a12bf152e9842fd522a487244bb3bb7d4941
|
|
| MD5 |
8553147f6bf95e8411e98a6084810ed6
|
|
| BLAKE2b-256 |
0f438ec8f193bdba5301582a5654cf40259bc41451ba7ee360a856450b583feb
|