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

Uploaded Python 3

File details

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

File metadata

  • Download URL: JD_SDK_CUSTOM-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 43076e7a674f52dfb10c2e871b61164b81d4346dfe3b1fa72848e22c3c553af7
MD5 d28efedbc8190c66953462c867e90dcb
BLAKE2b-256 d49585668c6da3d542cb371959ae945a4a3c3133bcebdf6a5ea6ac8b8b86d587

See more details on using hashes here.

File details

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

File metadata

  • Download URL: JD_SDK_CUSTOM-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cb6d37e4108a251ee00d27e0862096173064f816a2e0503328356cb816f1c2de
MD5 12567242117a64b5dbe3ca0166649b6e
BLAKE2b-256 2108a8fef23eef47cceaf14d15c4f9388d80001b4db64518cdff8d1d964a9d1c

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