Skip to content

Commit

Permalink
Added package setup
Browse files Browse the repository at this point in the history
  • Loading branch information
umartinez22 committed May 13, 2020
1 parent aff22b1 commit db1e0cd
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.vscode
/venv
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.8.2
17 changes: 17 additions & 0 deletions license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
MIT License
Copyright (c) 2018 Ulises Martinez Adon
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Empty file added phcm/__init__.py
Empty file.
1 change: 1 addition & 0 deletions hcm.py → phcm/hcm_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ def notify_topic_subscribers(self, topic: str, title: str, message_body: str):
"Authorization": f'Bearer {self.get_access_token()}'}
)
response = json.loads(urlopen(request).read())

return response['msg'] == 'Success'
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[metadata]
description-file = readme.md
21 changes: 21 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from distutils.core import setup
setup(
name = 'phcm', # How you named your package folder (MyLib)
packages = ['phcm'], # Chose the same as "name"
version = '1.0.0', # Start with a small number and increase it with every change you make
license='MIT', # Chose a license from here: https://help.github.com/articles/licensing-a-repository
description = 'Wrapper of api push huawei for sending notification push using python.', # Give a short description about your library
author = 'Ulises Martinez Adon', # Type in your name
author_email = 'umartinezadon@outlook.com', # Type in your E-Mail
url = 'https://github.com/umartinez22', # Provide either the link to your github or to your website
download_url = 'https://github.com/user/umartinez22/archive/v_1.0.0.tar.gz', # I explain this later on
keywords = ['Huawei', 'cloud', 'messaging', 'notification'], # Keywords that define your package best
install_requires=[],
classifiers=[
'Development Status :: 3 - Alpha', # Chose either "3 - Alpha", "4 - Beta" or "5 - Production/Stable" as the current state of your package
'Intended Audience :: Developers', # Define that your audience are developers
'Topic :: Software Development :: Build Tools',
'License :: OSI Approved :: MIT License', # Again, pick a license
'Programming Language :: Python :: 3.8.2'
],
)

0 comments on commit db1e0cd

Please sign in to comment.