Skip to main content

JD SDK version 2.0

Project description

python3 SDK

1. dependencies

  • rsa
  • psutil
  • apscheduler
  • wincertstore (when SKD is using in windows environment)

2. how to use

(1) use API

The code fragment shows the basic use of an API, the main steps are first init an api, and second to get the result

import jd.api
import json

jd.setDefaultAppInfo("your appKey", "your appSecret") # only need to init one time
# get a api you need to use
a = jd.api.AreaProvinceGetRequest('the domain this SDK will send request to', 80)
a.param = 'a'
f = a.getResponse("your access_token")
print(json.dumps(f, ensure_ascii=False))

The Example show a simple use of the SDK, in python, we just declare the fist level vars of xxxRequesst, so for some complex structures, we didn't specify for you, you can constuct the field with json by you self, then then use xxxRequesst.xxx = json to set the request param.

(2) security

from jd.security.tde_client.tde_client import TdeClientCache, TdeClient
tcc = TdeClientCache()
ins = tcc.instance("the domain this SDK will send request to", "access_token", "app_key", "app_secret")
# encryption
ciphertext = ins.encrypt_string('16612341234')
print(ciphertext)
# judge if the text is encrypted
if TdeClient.is_encrypt_data(ciphertext):
    # decryption
    print(ins.decrypt_string(ciphertext))

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

JD_SDK_CUSTOM-0.0.1.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

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

JD_SDK_CUSTOM-0.0.1-py3-none-any.whl (60.9 kB view details)

Uploaded Python 3

File details

Details for the file JD_SDK_CUSTOM-0.0.1.tar.gz.

File metadata

  • Download URL: JD_SDK_CUSTOM-0.0.1.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.9

File hashes

Hashes for JD_SDK_CUSTOM-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b1cdf1789647c4d2fbfbd6ad9eac1f7428e6f22ffb2ac15d7432a65ebb74f56f
MD5 3231d9a76321478379904740bdc215ef
BLAKE2b-256 1f8d60402417b59cad433c7730c0e7ac25dd3a3556f9cfb07fcec3bbf9b6693b

See more details on using hashes here.

File details

Details for the file JD_SDK_CUSTOM-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: JD_SDK_CUSTOM-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 60.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.9

File hashes

Hashes for JD_SDK_CUSTOM-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6e356ef0283e7a0249676ee7d752f253bbc0dbb2cf1cf31cd14e2f88ed19c569
MD5 5fc7d9de75985c370b8803eccf51eced
BLAKE2b-256 b109bd5276fdb2024148ce0cd8356342e70e0f282d1e2f6647e98206c4b64d2f

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