Work Weixin Api
企业微信接口封装库
目前实现了简单的发送消息功能,后序按照业务继续增加其他接口
install
pip install work-weixin-api
demo
# -*- coding: utf-8 -*-
from work_weixin_api import WorkWeixinClient
class CustomWorkWeixinClient(WorkWeixinClient):
"""配置自己企业的信息"""
# 企业id
corpid = ""
# 秘钥
corpsecret = ""
# 应用id
agent_id = "100000"
if __name__ == '__main__':
client = CustomWorkWeixinClient()
print(client.user_simplelist(department_id=1))
# 发送消息
print(client.message_send_text(
agentid=client.agent_id,
content='hi',
touser="PengShiYu"
))
说明
核心类继承关系:
class WorkWeixinApi(object):
"""
实现了最基础的企业微信接口函数
"""
class WorkWeixinClient(WorkWeixinApi):
"""
扩展了基本的接口函数
1、对access_token 进行了缓存
2、简化了接口调用操作
"""
Metadata
Release files for work-weixin-api 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| work-weixin-api-0.0.3.tar.gz | 5.8 kB | Without provenance | Details for work-weixin-api-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| work_weixin_api-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for work_weixin_api-0.0.3-py3-none-any.whl |
Total release size: 13.1 kB
Release files / work-weixin-api-0.0.3.tar.gz
| Download URL | work-weixin-api-0.0.3.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a5153379155fb98bd38b0ed6d90738fe8d5b3cfdc19b1a793a47df828b8a496
|
|
BLAKE2b-256 checksum How to use checksums |
d4e84299ea4cac7d41528c8edb723d5bcbcb8eaa9809ac9f0449a0747426d6f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.0
|
Release files / work_weixin_api-0.0.3-py3-none-any.whl
| Download URL | work_weixin_api-0.0.3-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dd295c2b779465f9c07d800d2bb09d30c093586e66d54707e592450e136edee8
|
|
BLAKE2b-256 checksum How to use checksums |
3f1439c82d44b5ad84af19be98cf83e95c87efc601b06a6b98e779784a4195b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.0
|
Security for work-weixin-api 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.