notificationhubs-rest-python 1.0.2__tar.gz → 1.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- notificationhubs_rest_python-1.0.3/.gitignore +191 -0
- notificationhubs_rest_python-1.0.3/CHANGELOGS.md +19 -0
- {notificationhubs_rest_python-1.0.2 → notificationhubs_rest_python-1.0.3}/PKG-INFO +14 -9
- {notificationhubs_rest_python-1.0.2 → notificationhubs_rest_python-1.0.3}/README.md +1 -1
- notificationhubs_rest_python-1.0.3/SECURITY.md +47 -0
- notificationhubs_rest_python-1.0.3/pyproject.toml +45 -0
- notificationhubs_rest_python-1.0.3/tests/test_notification_hub.py +38 -0
- notificationhubs_rest_python-1.0.2/notificationhubs_rest_python.egg-info/PKG-INFO +0 -57
- notificationhubs_rest_python-1.0.2/notificationhubs_rest_python.egg-info/SOURCES.txt +0 -8
- notificationhubs_rest_python-1.0.2/notificationhubs_rest_python.egg-info/dependency_links.txt +0 -1
- notificationhubs_rest_python-1.0.2/notificationhubs_rest_python.egg-info/top_level.txt +0 -1
- notificationhubs_rest_python-1.0.2/setup.cfg +0 -4
- notificationhubs_rest_python-1.0.2/setup.py +0 -26
- {notificationhubs_rest_python-1.0.2 → notificationhubs_rest_python-1.0.3}/LICENSE +0 -0
- {notificationhubs_rest_python-1.0.2 → notificationhubs_rest_python-1.0.3}/notificationhubs_rest_python/NotificationHub.py +0 -0
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
## Ignore Visual Studio temporary files, build results, and
|
|
2
|
+
## files generated by popular Visual Studio add-ons.
|
|
3
|
+
|
|
4
|
+
# User-specific files
|
|
5
|
+
*.suo
|
|
6
|
+
*.user
|
|
7
|
+
*.sln.docstates
|
|
8
|
+
Package.StoreAssociation.xml
|
|
9
|
+
|
|
10
|
+
# Build results
|
|
11
|
+
[Dd]ebug/
|
|
12
|
+
[Dd]ebugPublic/
|
|
13
|
+
[Rr]elease/
|
|
14
|
+
x64/
|
|
15
|
+
build/
|
|
16
|
+
bld/
|
|
17
|
+
[Bb]in/
|
|
18
|
+
[Oo]bj/
|
|
19
|
+
|
|
20
|
+
# MSTest test Results
|
|
21
|
+
[Tt]est[Rr]esult*/
|
|
22
|
+
[Bb]uild[Ll]og.*
|
|
23
|
+
|
|
24
|
+
#NUNIT
|
|
25
|
+
*.VisualState.xml
|
|
26
|
+
TestResult.xml
|
|
27
|
+
|
|
28
|
+
# Build Results of an ATL Project
|
|
29
|
+
[Dd]ebugPS/
|
|
30
|
+
[Rr]eleasePS/
|
|
31
|
+
dlldata.c
|
|
32
|
+
|
|
33
|
+
*_i.c
|
|
34
|
+
*_p.c
|
|
35
|
+
*_i.h
|
|
36
|
+
*.ilk
|
|
37
|
+
*.meta
|
|
38
|
+
*.obj
|
|
39
|
+
*.pdb
|
|
40
|
+
*.pgc
|
|
41
|
+
*.pgd
|
|
42
|
+
*.rsp
|
|
43
|
+
*.sbr
|
|
44
|
+
*.tlb
|
|
45
|
+
*.tli
|
|
46
|
+
*.tlh
|
|
47
|
+
*.tmp
|
|
48
|
+
*.tmp_proj
|
|
49
|
+
*.log
|
|
50
|
+
*.vspscc
|
|
51
|
+
*.vssscc
|
|
52
|
+
.builds
|
|
53
|
+
*.pidb
|
|
54
|
+
*.svclog
|
|
55
|
+
*.scc
|
|
56
|
+
|
|
57
|
+
# Chutzpah Test files
|
|
58
|
+
_Chutzpah*
|
|
59
|
+
|
|
60
|
+
# Visual C++ cache files
|
|
61
|
+
ipch/
|
|
62
|
+
*.aps
|
|
63
|
+
*.ncb
|
|
64
|
+
*.opensdf
|
|
65
|
+
*.sdf
|
|
66
|
+
*.cachefile
|
|
67
|
+
|
|
68
|
+
# Visual Studio profiler
|
|
69
|
+
*.psess
|
|
70
|
+
*.vsp
|
|
71
|
+
*.vspx
|
|
72
|
+
|
|
73
|
+
# TFS 2012 Local Workspace
|
|
74
|
+
$tf/
|
|
75
|
+
|
|
76
|
+
# Guidance Automation Toolkit
|
|
77
|
+
*.gpState
|
|
78
|
+
|
|
79
|
+
# ReSharper is a .NET coding add-in
|
|
80
|
+
_ReSharper*/
|
|
81
|
+
*.[Rr]e[Ss]harper
|
|
82
|
+
*.DotSettings.user
|
|
83
|
+
|
|
84
|
+
# JustCode is a .NET coding addin-in
|
|
85
|
+
.JustCode
|
|
86
|
+
|
|
87
|
+
# TeamCity is a build add-in
|
|
88
|
+
_TeamCity*
|
|
89
|
+
|
|
90
|
+
# DotCover is a Code Coverage Tool
|
|
91
|
+
*.dotCover
|
|
92
|
+
|
|
93
|
+
# NCrunch
|
|
94
|
+
*.ncrunch*
|
|
95
|
+
_NCrunch_*
|
|
96
|
+
.*crunch*.local.xml
|
|
97
|
+
|
|
98
|
+
# MightyMoose
|
|
99
|
+
*.mm.*
|
|
100
|
+
AutoTest.Net/
|
|
101
|
+
|
|
102
|
+
# Web workbench (sass)
|
|
103
|
+
.sass-cache/
|
|
104
|
+
|
|
105
|
+
# Installshield output folder
|
|
106
|
+
[Ee]xpress/
|
|
107
|
+
|
|
108
|
+
# DocProject is a documentation generator add-in
|
|
109
|
+
DocProject/buildhelp/
|
|
110
|
+
DocProject/Help/*.HxT
|
|
111
|
+
DocProject/Help/*.HxC
|
|
112
|
+
DocProject/Help/*.hhc
|
|
113
|
+
DocProject/Help/*.hhk
|
|
114
|
+
DocProject/Help/*.hhp
|
|
115
|
+
DocProject/Help/Html2
|
|
116
|
+
DocProject/Help/html
|
|
117
|
+
|
|
118
|
+
# Click-Once directory
|
|
119
|
+
publish/
|
|
120
|
+
|
|
121
|
+
# Publish Web Output
|
|
122
|
+
*.[Pp]ublish.xml
|
|
123
|
+
*.azurePubxml
|
|
124
|
+
PublishProfiles/
|
|
125
|
+
|
|
126
|
+
# NuGet Packages Directory
|
|
127
|
+
packages/
|
|
128
|
+
## TODO: If the tool you use requires repositories.config uncomment the next line
|
|
129
|
+
#!packages/repositories.config
|
|
130
|
+
|
|
131
|
+
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
|
|
132
|
+
# This line needs to be after the ignore of the build folder (and the packages folder if the line above has been uncommented)
|
|
133
|
+
!packages/build/
|
|
134
|
+
|
|
135
|
+
# Windows Azure Build Output
|
|
136
|
+
csx/
|
|
137
|
+
*.build.csdef
|
|
138
|
+
|
|
139
|
+
# Windows Store app package directory
|
|
140
|
+
AppPackages/
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
# Xamarin
|
|
144
|
+
*.userprefs
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
# Python
|
|
148
|
+
__pycache__/
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
# Others
|
|
153
|
+
sql/
|
|
154
|
+
*.Cache
|
|
155
|
+
ClientBin/
|
|
156
|
+
[Ss]tyle[Cc]op.*
|
|
157
|
+
~$*
|
|
158
|
+
*~
|
|
159
|
+
*.dbmdl
|
|
160
|
+
*.dbproj.schemaview
|
|
161
|
+
*.pfx
|
|
162
|
+
*.publishsettings
|
|
163
|
+
node_modules/
|
|
164
|
+
.DS_Store
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
# RIA/Silverlight projects
|
|
168
|
+
Generated_Code/
|
|
169
|
+
|
|
170
|
+
# Backup & report files from converting an old project file to a newer
|
|
171
|
+
# Visual Studio version. Backup files are not needed, because we have git ;-)
|
|
172
|
+
_UpgradeReport_Files/
|
|
173
|
+
Backup*/
|
|
174
|
+
UpgradeLog*.XML
|
|
175
|
+
UpgradeLog*.htm
|
|
176
|
+
|
|
177
|
+
# SQL Server files
|
|
178
|
+
*.mdf
|
|
179
|
+
*.ldf
|
|
180
|
+
|
|
181
|
+
# Business Intelligence projects
|
|
182
|
+
*.rdl.data
|
|
183
|
+
*.bim.layout
|
|
184
|
+
*.bim_*.settings
|
|
185
|
+
|
|
186
|
+
# Microsoft Fakes
|
|
187
|
+
FakesAssemblies/
|
|
188
|
+
|
|
189
|
+
#OSX files
|
|
190
|
+
.DS_Store
|
|
191
|
+
xcuserdata/
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.3] - 2026-10-14
|
|
9
|
+
|
|
10
|
+
- Declare `requests` and `six` as dependencies. Previously they had to be installed separately, otherwise importing the package failed
|
|
11
|
+
- Declare the supported Python versions (3.8 and newer) and add Python 3.13 and 3.14
|
|
12
|
+
- Move the package configuration from `setup.py` to `pyproject.toml`
|
|
13
|
+
- Publish releases to PyPI using trusted publishing
|
|
14
|
+
|
|
15
|
+
## [1.0.0] - 2024-07-17
|
|
16
|
+
|
|
17
|
+
- [#2](https://github.com/panevo/notificationhubs-rest-python/pull/2) Initial release of the Notification Hubs REST wrapper for Python.
|
|
18
|
+
- [#3](https://github.com/panevo/notificationhubs-rest-python/pull/3) Update SECURITY.md with information about the repository.
|
|
19
|
+
- [#4](https://github.com/panevo/notificationhubs-rest-python/pull/4) Update README.md with information about the repository.
|
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: notificationhubs-rest-python
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3
|
|
4
4
|
Summary: A Python library for sending notifications using Azure Notification Hubs REST API.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Author-email:
|
|
8
|
-
License: Apache-2.0
|
|
5
|
+
Project-URL: Homepage, https://github.com/panevo/notificationhubs-rest-python
|
|
6
|
+
Project-URL: Changelog, https://github.com/panevo/notificationhubs-rest-python/blob/main/CHANGELOGS.md
|
|
7
|
+
Author-email: "Panevo Services Ltd." <info@panevo.com>
|
|
8
|
+
License-Expression: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
9
10
|
Classifier: Intended Audience :: Developers
|
|
10
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
11
|
Classifier: Programming Language :: Python
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
13
|
Classifier: Programming Language :: Python :: 3.8
|
|
13
14
|
Classifier: Programming Language :: Python :: 3.9
|
|
14
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
15
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Requires-Python: >=3.8
|
|
21
|
+
Requires-Dist: requests>=2.25.0
|
|
22
|
+
Requires-Dist: six
|
|
17
23
|
Description-Content-Type: text/markdown
|
|
18
|
-
License-File: LICENSE
|
|
19
24
|
|
|
20
25
|
# Notification Hubs REST wrapper for Python
|
|
21
26
|
|
|
22
|
-

|
|
27
|
+

|
|
23
28
|
|
|
24
29
|
This is an implementation of a REST wrapper for sending notifications with Notification Hubs using the [REST APIs of Notification Hubs](http://msdn.microsoft.com/en-us/library/dn495827.aspx) from a Python back-end. The useage of this code is officially recommended by Microsoft in the [documentation](https://learn.microsoft.com/en-us/azure/notification-hubs/notification-hubs-python-push-notification-tutorial#client-interface).
|
|
25
30
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Notification Hubs REST wrapper for Python
|
|
2
2
|
|
|
3
|
-

|
|
3
|
+

|
|
4
4
|
|
|
5
5
|
This is an implementation of a REST wrapper for sending notifications with Notification Hubs using the [REST APIs of Notification Hubs](http://msdn.microsoft.com/en-us/library/dn495827.aspx) from a Python back-end. The useage of this code is officially recommended by Microsoft in the [documentation](https://learn.microsoft.com/en-us/azure/notification-hubs/notification-hubs-python-push-notification-tutorial#client-interface).
|
|
6
6
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<!-- BEGIN PANEVO NOTICE BLOCK -->
|
|
2
|
+
|
|
3
|
+
## Notice from Panevo
|
|
4
|
+
|
|
5
|
+
Panevo Services Ltd. is maintaining this repo for the sole purpose of publishing the Azure Notification Hub Python SDK to PyPI. In this regard, Panevo will only be pulling upstream changes from the original repo and not making any further changes, so that any users of this software are asked to follow Microsoft's security vulnerability process to report vulnerabilities.
|
|
6
|
+
|
|
7
|
+
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.2 BLOCK -->
|
|
8
|
+
|
|
9
|
+
## Security
|
|
10
|
+
|
|
11
|
+
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [many more](https://opensource.microsoft.com/).
|
|
12
|
+
|
|
13
|
+
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets Microsoft's [definition](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)) of a security vulnerability, please report it to us as described below.
|
|
14
|
+
|
|
15
|
+
## Reporting Security Issues
|
|
16
|
+
|
|
17
|
+
**Please do not report security vulnerabilities through public GitHub issues.**
|
|
18
|
+
|
|
19
|
+
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
|
|
20
|
+
|
|
21
|
+
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
|
|
22
|
+
|
|
23
|
+
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
|
|
24
|
+
|
|
25
|
+
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
|
|
26
|
+
|
|
27
|
+
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
|
|
28
|
+
* Full paths of source file(s) related to the manifestation of the issue
|
|
29
|
+
* The location of the affected source code (tag/branch/commit or direct URL)
|
|
30
|
+
* Any special configuration required to reproduce the issue
|
|
31
|
+
* Step-by-step instructions to reproduce the issue
|
|
32
|
+
* Proof-of-concept or exploit code (if possible)
|
|
33
|
+
* Impact of the issue, including how an attacker might exploit the issue
|
|
34
|
+
|
|
35
|
+
This information will help us triage your report more quickly.
|
|
36
|
+
|
|
37
|
+
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.
|
|
38
|
+
|
|
39
|
+
## Preferred Languages
|
|
40
|
+
|
|
41
|
+
We prefer all communications to be in English.
|
|
42
|
+
|
|
43
|
+
## Policy
|
|
44
|
+
|
|
45
|
+
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
|
|
46
|
+
|
|
47
|
+
<!-- END MICROSOFT SECURITY.MD BLOCK -->
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
# hatchling 1.27 is the last release that supports building on Python 3.8
|
|
3
|
+
requires = ["hatchling>=1.27"]
|
|
4
|
+
build-backend = "hatchling.build"
|
|
5
|
+
|
|
6
|
+
[project]
|
|
7
|
+
name = "notificationhubs-rest-python"
|
|
8
|
+
version = "1.0.3"
|
|
9
|
+
description = "A Python library for sending notifications using Azure Notification Hubs REST API."
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
license = "Apache-2.0"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [{ name = "Panevo Services Ltd.", email = "info@panevo.com" }]
|
|
14
|
+
requires-python = ">=3.8"
|
|
15
|
+
dependencies = [
|
|
16
|
+
"requests>=2.25.0",
|
|
17
|
+
"six",
|
|
18
|
+
]
|
|
19
|
+
classifiers = [
|
|
20
|
+
"Intended Audience :: Developers",
|
|
21
|
+
"Programming Language :: Python",
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Programming Language :: Python :: 3.8",
|
|
24
|
+
"Programming Language :: Python :: 3.9",
|
|
25
|
+
"Programming Language :: Python :: 3.10",
|
|
26
|
+
"Programming Language :: Python :: 3.11",
|
|
27
|
+
"Programming Language :: Python :: 3.12",
|
|
28
|
+
"Programming Language :: Python :: 3.13",
|
|
29
|
+
"Programming Language :: Python :: 3.14",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[project.urls]
|
|
33
|
+
Homepage = "https://github.com/panevo/notificationhubs-rest-python"
|
|
34
|
+
Changelog = "https://github.com/panevo/notificationhubs-rest-python/blob/main/CHANGELOGS.md"
|
|
35
|
+
|
|
36
|
+
[tool.hatch.build.targets.wheel]
|
|
37
|
+
packages = ["notificationhubs_rest_python"]
|
|
38
|
+
|
|
39
|
+
[tool.hatch.build.targets.sdist]
|
|
40
|
+
include = [
|
|
41
|
+
"/notificationhubs_rest_python",
|
|
42
|
+
"/tests",
|
|
43
|
+
"/CHANGELOGS.md",
|
|
44
|
+
"/SECURITY.md",
|
|
45
|
+
]
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import requests
|
|
2
|
+
|
|
3
|
+
from notificationhubs_rest_python.NotificationHub import AzureNotificationHub
|
|
4
|
+
|
|
5
|
+
CONNECTION_STRING = (
|
|
6
|
+
"Endpoint=sb://example.servicebus.windows.net/;"
|
|
7
|
+
"SharedAccessKeyName=DefaultFullSharedAccessSignature;"
|
|
8
|
+
"SharedAccessKey=dGVzdA=="
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class FakeResponse:
|
|
13
|
+
status_code = 201
|
|
14
|
+
reason = "Created"
|
|
15
|
+
|
|
16
|
+
def close(self):
|
|
17
|
+
pass
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def test_send_template_notification(monkeypatch):
|
|
21
|
+
requests_sent = []
|
|
22
|
+
|
|
23
|
+
def fake_post(url, data=None, headers=None):
|
|
24
|
+
requests_sent.append((url, data, headers))
|
|
25
|
+
return FakeResponse()
|
|
26
|
+
|
|
27
|
+
monkeypatch.setattr(requests, "post", fake_post)
|
|
28
|
+
|
|
29
|
+
hub = AzureNotificationHub(CONNECTION_STRING, "hub")
|
|
30
|
+
status, _ = hub.send_template_notification({"message": "Hello"}, tags="news")
|
|
31
|
+
|
|
32
|
+
assert status == 201
|
|
33
|
+
[(url, data, headers)] = requests_sent
|
|
34
|
+
assert url == "https://example.servicebus.windows.net/hub/messages/?api-version=2015-04"
|
|
35
|
+
assert data == '{"message": "Hello"}'
|
|
36
|
+
assert headers["ServiceBusNotification-Format"] == "template"
|
|
37
|
+
assert headers["ServiceBusNotification-Tags"] == "news"
|
|
38
|
+
assert headers["Authorization"].startswith("SharedAccessSignature sig=")
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: notificationhubs-rest-python
|
|
3
|
-
Version: 1.0.2
|
|
4
|
-
Summary: A Python library for sending notifications using Azure Notification Hubs REST API.
|
|
5
|
-
Home-page: https://github.com/panevo/notificationhubs-rest-python
|
|
6
|
-
Author: Karlo Krakan
|
|
7
|
-
Author-email: karlo.krakan@panevo.com
|
|
8
|
-
License: Apache-2.0 License
|
|
9
|
-
Classifier: Intended Audience :: Developers
|
|
10
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
|
-
Classifier: Programming Language :: Python
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
-
Description-Content-Type: text/markdown
|
|
18
|
-
License-File: LICENSE
|
|
19
|
-
|
|
20
|
-
# Notification Hubs REST wrapper for Python
|
|
21
|
-
|
|
22
|
-

|
|
23
|
-
|
|
24
|
-
This is an implementation of a REST wrapper for sending notifications with Notification Hubs using the [REST APIs of Notification Hubs](http://msdn.microsoft.com/en-us/library/dn495827.aspx) from a Python back-end. The useage of this code is officially recommended by Microsoft in the [documentation](https://learn.microsoft.com/en-us/azure/notification-hubs/notification-hubs-python-push-notification-tutorial#client-interface).
|
|
25
|
-
|
|
26
|
-
Panevo Services Ltd. is maintaining this repo for the sole purpose of publishing this Notification Hubs REST wrapper to PyPI. In this regard, Panevo will only be pulling upstream changes from the original repo and not making any further changes to the codebase.
|
|
27
|
-
|
|
28
|
-
This repository is a fork of Microsoft's [Azure Notification Hub Samples Repository](https://github.com/Azure/azure-notificationhubs-samples).
|
|
29
|
-
|
|
30
|
-
## How to use the code above
|
|
31
|
-
|
|
32
|
-
Install the package
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
pip install notificationhubs-rest-python
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Detailed readme is available here -
|
|
39
|
-
http://azure.microsoft.com/en-us/documentation/articles/notification-hubs-python-backend-how-to/
|
|
40
|
-
|
|
41
|
-
## Requirements
|
|
42
|
-
|
|
43
|
-
This package requires Python 3.8+ and version 2.25.0+ of the `requests` package.
|
|
44
|
-
|
|
45
|
-
## Registration management
|
|
46
|
-
|
|
47
|
-
For registration management you have to follow the content formats shown in the [REST APIs of Notification Hubs](http://msdn.microsoft.com/en-us/library/dn495827.aspx), and probably do some xml parsing is case of GETs. Be warned that element order is important and things will not work if the element are out of order.
|
|
48
|
-
|
|
49
|
-
## Notes
|
|
50
|
-
|
|
51
|
-
This code is provided as-is with no guarantees.
|
|
52
|
-
|
|
53
|
-
## Contributors
|
|
54
|
-
|
|
55
|
-
Adrian Hall (Splunk)
|
|
56
|
-
|
|
57
|
-
Panevo Services Ltd.
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
LICENSE
|
|
2
|
-
README.md
|
|
3
|
-
setup.py
|
|
4
|
-
notificationhubs_rest_python/NotificationHub.py
|
|
5
|
-
notificationhubs_rest_python.egg-info/PKG-INFO
|
|
6
|
-
notificationhubs_rest_python.egg-info/SOURCES.txt
|
|
7
|
-
notificationhubs_rest_python.egg-info/dependency_links.txt
|
|
8
|
-
notificationhubs_rest_python.egg-info/top_level.txt
|
notificationhubs_rest_python-1.0.2/notificationhubs_rest_python.egg-info/dependency_links.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
notificationhubs_rest_python
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
from setuptools import setup
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
setup(
|
|
6
|
-
name="notificationhubs-rest-python",
|
|
7
|
-
version="1.0.2",
|
|
8
|
-
include_package_data=True,
|
|
9
|
-
license="Apache-2.0 License",
|
|
10
|
-
description="A Python library for sending notifications using Azure Notification Hubs REST API.",
|
|
11
|
-
long_description=open("README.md").read(),
|
|
12
|
-
long_description_content_type="text/markdown",
|
|
13
|
-
url="https://github.com/panevo/notificationhubs-rest-python",
|
|
14
|
-
author="Karlo Krakan",
|
|
15
|
-
author_email="karlo.krakan@panevo.com",
|
|
16
|
-
classifiers=[
|
|
17
|
-
"Intended Audience :: Developers",
|
|
18
|
-
"License :: OSI Approved :: Apache Software License",
|
|
19
|
-
"Programming Language :: Python",
|
|
20
|
-
"Programming Language :: Python :: 3.8",
|
|
21
|
-
"Programming Language :: Python :: 3.9",
|
|
22
|
-
"Programming Language :: Python :: 3.10",
|
|
23
|
-
"Programming Language :: Python :: 3.11",
|
|
24
|
-
"Programming Language :: Python :: 3.12",
|
|
25
|
-
],
|
|
26
|
-
)
|
|
File without changes
|