web-push-libs / pywebpush

Python Webpush Data encryption library
Mozilla Public License 2.0
314 stars 53 forks source link

Send Bulk Push to multiple devices #140

Closed salimbuet09 closed 2 years ago

salimbuet09 commented 2 years ago

Sorry, It's a question not a bug report :)

In web-push-php, there is e bulk method to send pushes to multiple devices at a time. $webPush->queueNotification and then $webPush->flush()

is there any similar method in pywebpush?

jrconlin commented 2 years ago

No, partly because it'd be easier for folk to build their own.

There are a few different threading engines out there, and if I were to pick one, it might limit a developers ability to use the library. I've gotten burned quite a few times in the past by "helpful" libraries making functions like that, but then forcing me to alter my applications design or dependencies in order to fit their needs.

Instead, I tried to make the library reasonably thread friendly (allowing you to either share a common WebPusher or by building your own queue and divvying up load to multiple instances).

salimbuet09 commented 2 years ago

great thanks, I am closing it :)