All Projects → sbzhu → Weworkapi_python

sbzhu / Weworkapi_python

official lib of wework api https://work.weixin.qq.com/api/doc

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Weworkapi python

Atlas Of Thrones
An interactive "Game of Thrones" map powered by Leaflet, PostGIS, and Redis.
Stars: ✭ 253 (-1.17%)
Mutual labels:  api
Vk Java Sdk
Java library for working with VK API
Stars: ✭ 254 (-0.78%)
Mutual labels:  api
Django Oscar Api
RESTful JSON API for django-oscar
Stars: ✭ 251 (-1.95%)
Mutual labels:  api
Api autotest
接口自动化测试框架(java httpClient + testNg)
Stars: ✭ 253 (-1.17%)
Mutual labels:  api
Cloud Doc
一个在线文档阅读的微信小程序
Stars: ✭ 254 (-0.78%)
Mutual labels:  api
Laravel Query Builder
Easily build Eloquent queries from API requests
Stars: ✭ 3,083 (+1104.3%)
Mutual labels:  api
Api
Minimal, extremely fast, lightweight Ruby framework for HTTP APIs
Stars: ✭ 252 (-1.56%)
Mutual labels:  api
Stripe
A comprehensive PHP Library for the Stripe.
Stars: ✭ 256 (+0%)
Mutual labels:  api
Flysystem Dropbox
A flysystem driver for Dropbox that uses the v2 API
Stars: ✭ 254 (-0.78%)
Mutual labels:  api
Httpie
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie
Stars: ✭ 53,052 (+20623.44%)
Mutual labels:  api
Minha Receita
🏢 Sua API web para consulta de informações do CNPJ da Receita Federal
Stars: ✭ 255 (-0.39%)
Mutual labels:  api
R2dbc Spi
Service Provider Interface for R2DBC Implementations
Stars: ✭ 252 (-1.56%)
Mutual labels:  api
Python Binance
Binance Exchange API python implementation for automated trading
Stars: ✭ 4,114 (+1507.03%)
Mutual labels:  api
Coinbin.org
₿ A Human–Friendly API Service for Crypto Currency Information.
Stars: ✭ 253 (-1.17%)
Mutual labels:  api
Pysnowball
雪球股票数据接口 python edition
Stars: ✭ 256 (+0%)
Mutual labels:  api
React Fetches
🐙React Fetches a new way to make requests into your REST API's.
Stars: ✭ 253 (-1.17%)
Mutual labels:  api
Http Fake Backend
Build a fake backend by providing the content of JSON files or JavaScript objects through configurable routes.
Stars: ✭ 253 (-1.17%)
Mutual labels:  api
Pymisp
Python library using the MISP Rest API
Stars: ✭ 254 (-0.78%)
Mutual labels:  api
Syno
Simple Node.js wrapper and CLI for Synology DSM REST API 5.x and 6.x.
Stars: ✭ 255 (-0.39%)
Mutual labels:  api
Api Security Checklist
Checklist of the most important security countermeasures when designing, testing, and releasing your API
Stars: ✭ 16,339 (+6282.42%)
Mutual labels:  api

About

weworkapi_python 是为了简化开发者对企业微信API接口的使用而设计的,API调用库系列之python版本    
本库仅做示范用,并不保证完全无bug;
作者会不定期更新本库,但不保证与官方API接口文档同步,因此一切以官方文档为准。

更多来自个人开发者的其它语言的库推荐:
python : https://github.com/sbzhu/weworkapi_python [email protected](企业微信团队)
ruby : https://github.com/mycolorway/wework MyColorway(个人开发者)
php : https://github.com/sbzhu/weworkapi_php [email protected](企业微信团队)
golang : https://github.com/sbzhu/weworkapi_golang [email protected](企业微信团队)
golang : https://github.com/doubliekill/EnterpriseWechatSDK [email protected](个人开发者)

Director

├── api // API 接口
│   ├── examples // API接口的测试用例
│   ├── README.md
│   └── src // API接口的关键逻辑
├── conf.py
├── README.md

Usage

将本项目下载到你的目录,既可直接引用相关文件   详细使用方法参考examples路径下的测试用例

关于token的缓存

token是需要缓存的,不能每次调用都去获取token,否则会中频率限制
在本库的设计里,token是以类里的一个变量缓存的
比如api/src/CorpApi.py 里的access_token变量
在类的生命周期里,这个accessToken都是存在的, 当且仅当发现token过期,CorpAPI类会自动刷新token
刷新机制在 api/src/AbstractApi.py
所以,使用时,只需要全局实例化一个CorpAPI类,不要析构它,就可一直用它调函数,不用关心 token

api = CorpAPI(corpid, corpsecret);
api.dosomething()
api.dosomething()
api.dosomething()
....

当然,如果要更严格的做的话,建议自行修改,全局缓存token,比如存redis、存文件等,失效周期设置为2小时。

Contact us

[email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].