https://www.pushsafer.com/en/python
Unfortunately, the code is hopelessly broken:
- State is stored in a global variable, not a class, so you can only ever have one login
- Classes are used as functions
- Client() never does anything with the privatekey argument
- Client has a completely useless empty list (devices) which is never written to
- There is random whitespace all over the place
- Client.send_message has only positional args, so you have to manually set them to `None` to avoid problems.
- Client send_message *incorrectly sends post data as parameters*, thus meaning the library will never work anyway.
- Lots of the logic is implemented in very questionable ways (e.g. using getattr to retrieve requests.post).
I don't know who the developer is, or whether the code is actively developed. I could submit a PR fixing all this (I probably will, now I've been so emphatic about it) but the fact that the library is in a state in which it could never possibly work suggests that nobody actually uses it. Thus I wonder whether there is any point keeping the library around at all? It will likely only get out of sync with the api, and the api is perfectly clear and easy to use without bindings. Thus I suggest just deleting it and updating the python api docs (I'm happy to suggest an update for that if you want).
Incidentally, the python instructions on the api page are needlessly complicated since they don't use requests, which 99.999% of developers are going to do.
Src is at https://github.com/appzer/python-pushsa ... shsafer.py
Note that pushsafer is a great utility and none of this in any way detracts from that: I'm very glad it exists
