Skip to main content

DingTalk App AccessToken Refresh Tool

Project description

dingtalk-app-accesstoken-refresh

钉钉应用 AccessToken 刷新工具

基本逻辑

  1. 通过 HTTP 请求获取指定应用的 AccessToken
  2. 获取到的 AccessToken 存储到本地文件
  3. 在获取 AccessToken 时,先从本地文件获取,如果过期则重新获取

安装

pip install dingtalk-app-accesstoken-refresh

依赖库

  • TinyDB 作为本地存储库

使用方法

from dingtalk_app_accesstoken_refresh import (
    CacheSource,
    DingTalkAppAccessTokenRefreshClient,
)

client = DingTalkAppAccessTokenRefreshClient()
client.enable_local_cache('cache.json')
with client.get_access_token(
    client_id='<client_id>',
    client_secret='<client_secret>',
    cache_source=CacheSource.LOCAL,
) as access_token:
    print(access_token)

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

dingtalk_app_accesstoken_refresh-0.1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file dingtalk_app_accesstoken_refresh-0.1.0.tar.gz.

File metadata

  • Download URL: dingtalk_app_accesstoken_refresh-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dingtalk_app_accesstoken_refresh-0.1.0.tar.gz
Algorithm Hash digest
SHA256 eeebc7a5ce7f1af7833de81dec5a1173116dfb777d0b381fa2b0e483251b7444
MD5 e5c8234625c32e016772a4b900e8c8e2
BLAKE2b-256 4c8982a27a2d6724c450d6f7c5b87f02efa4cf12c1131b8bf2ae65cccf413114

See more details on using hashes here.

File details

Details for the file dingtalk_app_accesstoken_refresh-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dingtalk_app_accesstoken_refresh-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dingtalk_app_accesstoken_refresh-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ec93323337f833b7508a694aed1201b851d892f1b6dcaf989d990b0a9f88850
MD5 2bd81e7d117bf579bf3fc61d1c4df9ee
BLAKE2b-256 691ab2f2daee938ac3fa44677c0eca1df5fa9350fb14b98a76b6383527819699

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