sbzhu / weworkapi_python Goto Github PK
View Code? Open in Web Editor NEWofficial lib of wework api https://work.weixin.qq.com/api/doc
official lib of wework api https://work.weixin.qq.com/api/doc
依赖库pycrypto建议换成 pycryptodome 。要不然 windows安装 会失败
强烈建议发布一个Python3.5+的版本。
不知道是不是python3所有版本都是这样,我改用pycryptodome包后正常了
PKCS7Encoder类中,amount_to_pad == 0不会发生
代码如下:
amount_to_pad = self.block_size - (text_length % self.block_size)
if amount_to_pad == 0:
amount_to_pad = self.block_size
连个flake8都过不去,能不能开发好点
你好,官方提供的python api代码是python2的,为了适应我们的需要,我基于这个源码修改成了python3的,可以么
有没有bug,可以一步步改进。但没有说明使用什么开源协议可不行啊。麻烦请尽快加入,这样开发企业微信应用的公司才敢用啊。
可能是流程没太懂,导致解密步骤一直卡着。。
in python cann't use ++, should be +=1
你好,本人在官方API的基础上封装并开发了一个简单的企业微信消息推送的库:corpwechat-bot,通过该库能够更加方便的实现开箱即用的消息推送方式:
具体效果可以查看QuickStart,
目前,基本上已经完成了官方大部分的消息推送,每个消息推送都可以通过一行代码实现,希望能被官方收录:)
RT
执行的时候报:40001 invalid credential, hint: [1597733128_47_64fcadb1b2caaa453d570b16348fd1ae]...
有python3的版本吗?
我是从java转过来的,请大牛提供一个django2.x+Python3.x的分支。
使用 requests 可以成功上传英文文件名的文件,但不能上传文件名包含中文的情况。
能否给出使用 requests 上传文件名包含中文的示例?
我目前的做法:
f = open(u'测试.txt', 'rb')
url = '''https://qyapi.weixin.qq.com/cgi-bin/media/upload?access_token=%s&type=file''' % ac_token
files = {'file': ('测试.txt', f)}
r = requests.post(url, files=files)
返回的是
{u'errcode': 44001, u'errmsg': u'empty media data, hint: [ ], more info at https://open.work.weixin.qq.com/devtool/query?e=44001'}
看起来是 requests 将 Content-Disposition 部分写为了:
Content-Disposition: form-data; name="file"; filename*=utf-8''%E6%B5%8B%E8%AF%95.txt
使用 API 测试页面 可以成功上传中文文件名的文件,看到的 Request Payload 为:
Content-Disposition: form-data; name="media"; filename="测试.txt"
if not signature == sMsgSignature:
我这个一直不相等,是为什么呢
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.