1

I'm trying to use HTML5 Web Push in my appengine web app. I got the front-end working, and am even able to get the subscription data with ajax and store it in my db, and then retrieve it when the correct event happens. However, I can't figure out what library I have to use to push it.

The one in the standard set pywebpush, uses the c based cryptography library which I can't use on appengine. I can't find a single web push python library that uses pycrypto: solidwebpush is the same way.

So do I have to write my own web push library with all the encryption stuff, a rather monumental task? Or is there some easier way or library that I'm missing. BTW app engine flexible is not really an option because of the cost, and I'm on python 2.7

Dustin Ingram
  • 20,502
  • 7
  • 59
  • 82
Bu Hao
  • 11
  • 1
  • https://stackoverflow.com/questions/49719643/from-cryptography-hazmat-bindings-constant-time-import-lib-importerror-no-modu This is sort of a duplicate, but not really, because his answer was just getting at the root of the import error, and left it at just using GAE flexible, which isn't an option for most projects. – Bu Hao Nov 05 '18 at 16:16

1 Answers1

1

Your options for bringing dependencies with C extensions like cryptography are limited to:

So it seems like you either need to migrate to Python 3, or embrace the additional cost here.

Dustin Ingram
  • 20,502
  • 7
  • 59
  • 82
  • my question wasn't how to use dependencies with c extensions, but rather if there exists a way to do web push with `pycrypto` or builtins rather than `cryptography` – Bu Hao Nov 11 '18 at 04:33