Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jpush-api-python-client
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
jpush-api-python-client
Commits
6c78889d
Commit
6c78889d
authored
May 19, 2016
by
fendouai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add compatibility to readme
parent
3ff1f3fb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
README.md
README.md
+6
-0
example_all.py
examples/push_examples/example_all.py
+3
-3
core.py
jpush/core.py
+1
-1
No files found.
README.md
View file @
6c78889d
...
@@ -5,6 +5,12 @@
...
@@ -5,6 +5,12 @@
对应的 REST API 文档:
<http://docs.jpush.io/server/rest_api_v3_push/>
对应的 REST API 文档:
<http://docs.jpush.io/server/rest_api_v3_push/>
## 兼容版本
Python 2.7
Python 3 还没有兼容,以后会兼容。
建议 Python3 的开发者继续使用 jpush 3.1.2,pip 地址:
> https://pypi.python.org/pypi?:action=display&name=jpush&version=3.1.2
## 环境配置
## 环境配置
pip 方式:
pip 方式:
...
...
examples/push_examples/example_all.py
View file @
6c78889d
...
@@ -18,6 +18,6 @@ except common.Unauthorized:
...
@@ -18,6 +18,6 @@ except common.Unauthorized:
except
common
.
APIConnectionException
:
except
common
.
APIConnectionException
:
raise
common
.
APIConnectionException
(
"conn"
)
raise
common
.
APIConnectionException
(
"conn"
)
except
common
.
JPushFailure
:
except
common
.
JPushFailure
:
print
"JPushFailure"
print
(
"JPushFailure"
)
except
:
except
:
print
"Exception"
print
(
"Exception"
)
\ No newline at end of file
\ No newline at end of file
jpush/core.py
View file @
6c78889d
...
@@ -72,7 +72,7 @@ class JPush(object):
...
@@ -72,7 +72,7 @@ class JPush(object):
if
(
level
==
"NOTSET"
):
if
(
level
==
"NOTSET"
):
logging
.
basicConfig
(
level
=
logging
.
NOTSET
)
logging
.
basicConfig
(
level
=
logging
.
NOTSET
)
else
:
else
:
print
"set logging level failed ,the level is invalid."
print
(
"set logging level failed ,the level is invalid."
)
def
create_push
(
self
):
def
create_push
(
self
):
"""Create a Push notification."""
"""Create a Push notification."""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment