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

Uploaded Python 3

File details

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

File metadata

  • Download URL: JD_SDK_CUSTOM-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 f62b31e47166def43de80413014b9a66cbab47d11402a63d7ea3a6c95583cd4b
MD5 f1c5422f64c20934ffef4d4df3cd56c2
BLAKE2b-256 7c405e216187684db5b69cf6eb000faa4f66b844040d4e043e927ff717ed0973

See more details on using hashes here.

File details

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

File metadata

  • Download URL: JD_SDK_CUSTOM-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 086fb6ee2aaa1629fbf14f8d0f1b3fa962d94f3c95a68058357f971a5edc3645
MD5 29bae7c69653541e98ef45ec5405c4f7
BLAKE2b-256 a5657a0d85ea46b37fcbb042fe7089958ae65969c8e1557d7011af242520c42a

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