Skip to main content

wx-svr-api

微信公众号服务端 API 封装:获取 access_token,支持从 .env 读取配置,以及可选的 Redis 缓存(TTL 7000 秒)。

安装

pip install wx-svr-api

用法

from wx_svr_api import WxSvrApi

api = WxSvrApi.from_env()
token = api.get_access_token()

环境变量:APPID、APPSECRET;启用 Redis 缓存时配置 REDIS_HOST、REDIS_PORT、REDIS_PASSWORD、REDIS_DB。详见仓库内 .env.example。

文档

Metadata

Release files for wx-svr-api 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wx-svr-api 0.1.0
File Size Uploaded
wx_svr_api-0.1.0.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wx-svr-api 0.1.0
File Interpreter ABI Platform
wx_svr_api-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.0 kB

Release files / wx_svr_api-0.1.0.tar.gz

Download URL wx_svr_api-0.1.0.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e4e6e201db88fe1c35fe2a2d1089abef2a79e8a028eeaee49d04cd94e9b35b5f
BLAKE2b-256 checksum
How to use checksums
011fb3f444fb8b818a2560ead8d1370cfc9e79e60416ace8d139dfe614d80505
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / wx_svr_api-0.1.0-py3-none-any.whl

Download URL wx_svr_api-0.1.0-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e0bf00b5c2bd5a424b5f05dc1b3c6c7e9810f7eae920b627156e7e5eb466da9
BLAKE2b-256 checksum
How to use checksums
d3d4308472c09b7e177cb88ea33edaa6d46db604363faa028fa830c29d6a81f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page