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.2.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.2-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ks_shop_python_sdk-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 c07e87f70ec48cc99dab22de28486bc4573aa051503e0aaff4c671b5de3930cc
MD5 807d677652e285c5f47182a201172540
BLAKE2b-256 8ac60f801d63b87df4c3d7c5e6f631d47dfddd2ec7ed06438007a8e199b41044

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ks_shop_python_sdk-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1cd9e7ea76c3ee97dbeea216ad6b0b2daa71e865cd34367ce78c181dd7bd6b71
MD5 625d367814ecabdfa9c82098ebd558c2
BLAKE2b-256 99a3052124b96ec2778f0644e393ebfd50c8a50e9b47da9bbc87bf8c7a22b30b

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