Update vapid requirement
This commit is contained in:
parent
051e1575a3
commit
69059ef45c
26
README.md
26
README.md
|
@ -169,4 +169,30 @@ Encode the `data` for future use. On error, returns a `WebPushException`
|
|||
encoded_data = WebPush(subscription_info).encode(data)
|
||||
```
|
||||
|
||||
## Stand Alone Webpush
|
||||
|
||||
If you're not really into coding your own solution, there's also a "stand-alone" `pywebpush` command in the
|
||||
./bin directory.
|
||||
|
||||
This uses two files:
|
||||
* the *data* file, which contains the message to send, in whatever form you like.
|
||||
* 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:
|
||||
|
||||
```json
|
||||
{"endpoint": "https://push...",
|
||||
"keys": {
|
||||
"auth": "ab01...",
|
||||
"p256dh": "aa02..."
|
||||
}}
|
||||
```
|
||||
|
||||
If you're interested in just testing your applications WebPush interface, you could use the Command Line:
|
||||
|
||||
```bash
|
||||
./bin/pywebpush --data stuff_to_send.data --info subscription.info
|
||||
```
|
||||
which will encrypt and send the contents of `stuff_to_send.data`.
|
||||
|
||||
See `./bin/pywebpush --help` for available commands and options.
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
cryptography>=2.6.1
|
||||
http-ece>=1.1.0
|
||||
requests>=2.21.0
|
||||
py-vapid>=1.4.0
|
||||
py-vapid>=1.5.0
|
||||
|
|
Loading…
Reference in New Issue