Skip to main content

Kuaishou Shop Python SDK

Project description

安装
pip install  ks-shop-python-sdk
获取access_token
from ks_shop_api.utils import get_access_token_by_code, refresh_access_token


app_id = "xxxx"  # 应用ID
app_secret = "xxxx"  # 应用密钥
code = "xxxx"  # 首次授权通过回调地址中的code
first_res = get_access_token_by_code(app_id, app_secret, code)
print(first_res)


refresh_token = "xxxxx"  # 刷新令牌
refresh_res = refresh_access_token(app_id, app_secret, refresh_token)
print(refresh_res)
使用
from ks_shop_api.funds.request import CenterAccountInfoRequest
from ks_shop_api.funds.schema import CenterAccountInfoSchema
from ks_shop_api.schema import baseAppInfoSchema


access_token = 'xxxx'
base_app_info = baseAppInfoSchema()
base_app_info.app_key = "xxxx"
base_app_info.secret = "xxxx"
base_app_info.sign_secret = "xxxx"
print(base_app_info)
ks_obj = CenterAccountInfoRequest(**base_app_info.model_dump())
ks_schema = CenterAccountInfoSchema()
print(ks_schema)
print(ks_schema.model_dump())

res = ks_obj.getResponse(access_token, params=ks_schema)
print(res)

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

ks_shop_python_sdk-0.1.3.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

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

ks_shop_python_sdk-0.1.3-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file ks_shop_python_sdk-0.1.3.tar.gz.

File metadata

  • Download URL: ks_shop_python_sdk-0.1.3.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.15

File hashes

Hashes for ks_shop_python_sdk-0.1.3.tar.gz
Algorithm Hash digest
SHA256 08241c61a65698cf45d9cdcbae5be7a8420372ce142d670a24c5015cf9ed6444
MD5 fd910e03715e987f56d22bfecec0605b
BLAKE2b-256 5143478427a74d4bd9c9cf3995f1fc0462afa0a0ff1a93d844faec6e2a799f14

See more details on using hashes here.

File details

Details for the file ks_shop_python_sdk-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for ks_shop_python_sdk-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 130bf97c8f89040e49c11676445d68ee88524e6d483942a3b92a0d05e5959ade
MD5 ead6b68ffa970634dcd6943ea3a84338
BLAKE2b-256 91bea59a3d0879afdde6e669bd6485f72434241b07ef87e655e4d8a23243dd8d

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