-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- `uids` is NOT required parameter for `send_message` now. - `flake8` and its extensions compatibility. - `setuptools_scm` for version. - `pipenv` for dependencies management.
- Loading branch information
Showing
19 changed files
with
139 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,4 +129,6 @@ dmypy.json | |
.pyre/ | ||
|
||
# Custom | ||
.vscode | ||
Pipfile.lock | ||
config.py |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[[source]] | ||
name = "pypi" | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
|
||
[dev-packages] | ||
flake8 = "*" | ||
flake8-commas = "*" | ||
flake8-docstrings = "*" | ||
flake8-import-order = "*" | ||
pep8-naming = "*" | ||
pylint = "*" | ||
|
||
[packages] | ||
wxpusher = {editable = true,path = "."} | ||
|
||
[requires] | ||
python_version = "3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,52 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Python packaging for wxpusher. | ||
File: setup.py | ||
Author: huxuan | ||
Email: i(at)huxuan.org | ||
Description: Python packaging for wxpusher. | ||
""" | ||
from pkg_resources import DistributionNotFound | ||
from pkg_resources import get_distribution | ||
|
||
from setuptools import setup | ||
|
||
NAME = 'wxpusher' | ||
|
||
CLASSIFIERS = [ | ||
'Development Status :: 4 - Beta', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: Apache Software License', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3 :: Only', | ||
'Topic :: Utilities' | ||
'Topic :: Utilities', | ||
] | ||
|
||
INSTALL_REQUIRES = [ | ||
'requests' | ||
'requests', | ||
] | ||
|
||
DEV_REQUIRES = [ | ||
'pycodestyle', | ||
'pyflakes', | ||
'pylint' | ||
] | ||
|
||
TEST_REQUIRES = [ | ||
'coverage', | ||
'nose' | ||
] | ||
|
||
EXTRAS_REQUIRE = { | ||
'dev': DEV_REQUIRES, | ||
'test': TEST_REQUIRES | ||
} | ||
|
||
DESCRIPTION = ( | ||
'WxPusher Python SDK.' | ||
) | ||
|
||
VERSION = open('VERSION').read().strip() | ||
KEYWORDS = [ | ||
'wxpusher', | ||
'wechat', | ||
'weixin', | ||
'notification', | ||
'push-notification', | ||
'python-sdk', | ||
] | ||
|
||
try: | ||
VERSION = f'v{get_distribution(NAME).version}' | ||
except DistributionNotFound: | ||
VERSION = 'master' | ||
|
||
PROJECT_URL = 'https://github.com/wxpusher/wxpusher-sdk-python' | ||
BASE_URL = f'{PROJECT_URL}/blob/v{VERSION}' | ||
BASE_URL = f'{PROJECT_URL}/blob/{VERSION}' | ||
|
||
|
||
def readme(): | ||
|
@@ -54,19 +57,19 @@ def readme(): | |
return content | ||
|
||
|
||
setup(name='wxpusher', | ||
version=VERSION, | ||
setup(name=NAME, | ||
description=DESCRIPTION, | ||
long_description=readme(), | ||
long_description_content_type='text/markdown', | ||
classifiers=CLASSIFIERS, | ||
keywords='wxpusher wechat push-notification', | ||
url='https://github.com/wxpusher/wxpusher-sdk-python', | ||
keywords=' '.join(KEYWORDS), | ||
url=PROJECT_URL, | ||
author='Xuan (Sean) Hu', | ||
author_email='[email protected]', | ||
license='Apache License 2.0', | ||
packages=['wxpusher'], | ||
use_scm_version=True, | ||
setup_requires=['setuptools_scm'], | ||
install_requires=INSTALL_REQUIRES, | ||
extras_require=EXTRAS_REQUIRE, | ||
python_requires='>=3', | ||
include_package_data=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Init for WxPusher. | ||
File: __init__.py | ||
Author: huxuan | ||
Email: i(at)huxuan.org | ||
Description: init for WxPusher. | ||
""" | ||
from .wxpusher import WxPusher | ||
from .exceptions import WxPusherException | ||
from .exceptions import WxPusherNoneTokenException | ||
from .wxpusher import WxPusher | ||
|
||
__all__ = [ | ||
'WxPusher', | ||
'WxPusherException', | ||
'WxPusherNoneTokenException' | ||
'WxPusherNoneTokenException', | ||
] | ||
|
||
__version__ = open('VERSION').read().strip() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Unittest configuration sample. | ||
File: config.sample.py | ||
Author: huxuan | ||
Email: i(at)huxuan.org | ||
Description: Unittest configuration sample. | ||
""" | ||
# the `appToken` for test. | ||
TOKEN = '' | ||
|
||
# the `uids` for test, note that it should be a list. | ||
UIDS = [ | ||
'' | ||
'', | ||
] | ||
|
||
# the `topic_ids` for test, note that it should be a list. | ||
TOPIC_IDS = [ | ||
'', | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.