微信公众号服务端 API 封装:获取 access_token,可选 Redis 缓存。
Project description
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。
文档
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wx_svr_api-0.1.0.tar.gz
(3.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wx_svr_api-0.1.0.tar.gz.
File metadata
- Download URL: wx_svr_api-0.1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4e6e201db88fe1c35fe2a2d1089abef2a79e8a028eeaee49d04cd94e9b35b5f
|
|
| MD5 |
87433fb168b33111bce7e4ed79a6612c
|
|
| BLAKE2b-256 |
011fb3f444fb8b818a2560ead8d1370cfc9e79e60416ace8d139dfe614d80505
|
File details
Details for the file wx_svr_api-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wx_svr_api-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e0bf00b5c2bd5a424b5f05dc1b3c6c7e9810f7eae920b627156e7e5eb466da9
|
|
| MD5 |
2d750147a8f206e63b3828d720579de2
|
|
| BLAKE2b-256 |
d3d4308472c09b7e177cb88ea33edaa6d46db604363faa028fa830c29d6a81f3
|