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

Uploaded Python 3

File details

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

File metadata

  • Download URL: JD_SDK_CUSTOM-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 a5e59ece05fe89c989bd3aa7a2b15f06864a88a6b50fe9a0565d7796ec81714f
MD5 ac74df3b35f96a52f76063771844db00
BLAKE2b-256 0fc1b2a3d96871708105cc6f61a3f2919d4d44d30dc2f2f6fbf41b82349456eb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: JD_SDK_CUSTOM-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 780590470e517fb79cb06839d9e3f847f361df75518218646f26860e664c2f82
MD5 3ec6f7b8e8c04950bb28ce2a80940587
BLAKE2b-256 8357e97a282023026b95cf08c490157c4c948a9c77fae3c36b6c3ad6ac0f2a40

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