Skip to content

Commit 69059ef

Browse files
committed
Update vapid requirement
1 parent 051e157 commit 69059ef

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,30 @@ Encode the `data` for future use. On error, returns a `WebPushException`
169169
encoded_data = WebPush(subscription_info).encode(data)
170170
```
171171

172+
## Stand Alone Webpush
173+
174+
If you're not really into coding your own solution, there's also a "stand-alone" `pywebpush` command in the
175+
./bin directory.
176+
177+
This uses two files:
178+
* the *data* file, which contains the message to send, in whatever form you like.
179+
* the *subscription info* file, which contains the subscription information as JSON encoded data. This is usually returned by the Push `subscribe` method and looks something like:
180+
181+
```json
182+
{"endpoint": "https://push...",
183+
"keys": {
184+
"auth": "ab01...",
185+
"p256dh": "aa02..."
186+
}}
187+
```
188+
189+
If you're interested in just testing your applications WebPush interface, you could use the Command Line:
190+
191+
```bash
192+
./bin/pywebpush --data stuff_to_send.data --info subscription.info
193+
```
194+
which will encrypt and send the contents of `stuff_to_send.data`.
195+
196+
See `./bin/pywebpush --help` for available commands and options.
197+
172198

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
cryptography>=2.6.1
22
http-ece>=1.1.0
33
requests>=2.21.0
4-
py-vapid>=1.4.0
4+
py-vapid>=1.5.0

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from setuptools import find_packages, setup
55

66

7-
__version__ = "1.9.2"
7+
__version__ = "1.9.3"
88

99

1010
def read_from(file):

0 commit comments

Comments
 (0)