Skip to main content
python-weixin
-----
A Python client for the Weixin REST APIs

0.0.3 新功能
-----
* 添加超时处理
* 修改包名

0.0.2 新功能
-----
增加微信公众平台支持


Installation
-----
python setup.py install

Requires
-----
* requests
* simplejson
* six


Authentication
-----
Weixin API 使用 OAuth2 认证方式
详情见: https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&lang=zh_CN


### Authenticating a user
具体使用方法参考 sample app


### Using an access token
获取到access token 后,可以使用token 获取 用户信息等:

微信开放平台使用示例:

``` python
from pyWeixin.client import WeixinAPI

scope = ("snsapi_login", )
api = WeixinAPI(appid=APP_ID,
app_secret=APP_SECRET,
redirect_uri=REDIRECT_URI)
authorize_url = api.get_authorize_url(scope=scope)

access_token = api.exchange_code_for_access_token(code=code)

api = WeixinAPI(access_token=access_token)

user = api.user(openid="openid")
```

微信公众平台使用示例:

``` python
from pyWeixin.client import WeixinMpAPI

scope = ("snsapi_base", )
api = WeixinMpAPI(appid=APP_ID,
app_secret=APP_SECRET,
redirect_uri=REDIRECT_URI)
authorize_url = api.get_authorize_url(scope=scope)

access_token = api.exchange_code_for_access_token(code=code)

api = WeixinMpAPI(access_token=access_token)

user = api.user(openid="openid")
```

Release files for python-weixin 0.0.3

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

Source distribution (sdist)

Source distribution for python-weixin 0.0.3
File Size Uploaded
python-weixin-0.0.3.tar.gz 7.2 kB Details

Release files / python-weixin-0.0.3.tar.gz

Download URL python-weixin-0.0.3.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a62fabd0bda2a8cf00cf2432e645f658be8de35d742c540ecd777b2a9162210d
BLAKE2b-256 checksum
How to use checksums
fab18037283a0f1c388a4e504b62b164d446b858a33f69f6f9a5e4672f77b8d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.5.0

1 release file

0.4.7

1 release file

0.4.6

1 release file

0.4.5

1 release file

0.4.4

1 release file

0.4.3

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

2 release files

0.3.1

1 release file

0.3.0

2 release files

0.2.3

1 release file

0.2.2

1 release file

0.2.0

1 release file

0.1.9.1

1 release file

0.1.9

1 release file

0.1.8.1

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.4

This release

0.0.3 This release

1 release file

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