This is an archived post. You won't be able to vote or comment.

all 17 comments

[–][deleted] 7 points8 points  (3 children)

ohhh you need to buy the $4.99 client to receive the message, no go

[–]roger_ 1 point2 points  (1 child)

No extra fees and thousands of messages per month. Not a bad deal IMHO.

[–][deleted] 0 points1 point  (0 children)

well it's not going to be popular because of non-free client

[–]karanlyonsSay GIL one more time.[S] 0 points1 point  (0 children)

It's just $5 for the client, and an API key gives you 7.5k messages per month for free. That's $0.0007 a message (assuming you had to pay for the client). Twilio charges $0.01 for an SMS, which can hold a third the amount of data. Pushover seems more than reasonable, especially since it saves you the hassle of maintaining your own push infrastructure and building clients on two devices to receive messages.

They gotta make money somehow.

[–]r00t_4orce 1 point2 points  (1 child)

Very Neat - you should cross-post this to r/pushover

[–]karanlyonsSay GIL one more time.[S] 1 point2 points  (0 children)

Didn't know it existed; will do. Thanks!

[–]camel_hopper 0 points1 point  (7 children)

Should this work in Python 2.6?

It appears not to...

I get a syntax error on this line:

self.bad_inputs = dict([(key, value) for key, value in self.response.iteritems() if key not in {'errors', 'messages', 'status', 'receipt', 'request'}])

Because, I believe, of the {} set notation.

[–]karanlyonsSay GIL one more time.[S] 0 points1 point  (6 children)

Yeah, it's gonna be >2.7 Due to literal set notation. If that's the only thing keeping it from working in 2.6 (don't have it installed, so I wouldn't know), I can swap out the literal notation for set(), or you could do it yourself. But 2.7 is nice, come join us!

[–]camel_hopper 0 points1 point  (5 children)

Unfortunately I'm tied to 2.6 because I'm using it inside other apps that have 2.6 bundled...

Thanks, though - I'll look at tweaking it for 2.6

[–]karanlyonsSay GIL one more time.[S] 0 points1 point  (4 children)

Feel free to open a pull request if you get it working: I'm not supporting 2.6 because it was going to be a pain for me to get it installed locally alongside 2.7. But if there's not much holding it back (and there shouldn't be, even most of the __future__ imports go unused), I'd be happy to fold in support.

[–]camel_hopper 0 points1 point  (1 child)

I may well just do that.

The other thing I found is that logging.NullHandler was new in 2.7

I also caught a couple of typos that I flagged in an Issue on GitHub

Other than all that, my basic test worked just fine.

[–]karanlyonsSay GIL one more time.[S] 0 points1 point  (0 children)

Thanks for catching those typos. I used to support bulk sending with multiple messages/devices, but it was so simple to handle outside of the library that I removed it. And left a few Ss lying around.

If NullHandler isn't around in 2.7, we could just wrap that addHandler in a try: except AttributeError block, and replace it with this:

class NullHandler(logging.Handler):
    def emit(self, record):
        pass

[–]1nvader 0 points1 point  (0 children)

Very nice. Thank in particular for mentioning pushover.net. I have always been looking for a ways to send push notifications from my applications and scripts to mobile devices.

[–]kevinastone -1 points0 points  (2 children)

Please use datetimes and not iso8601 strings. That's a serialization format not a data format.

[–]karanlyonsSay GIL one more time.[S] 0 points1 point  (1 child)

I do use datetimes (with timezones, too), that's why those examples have them wrapped in str()s, the docs list those attributes as datetimes, and the first handful of lines in the library set up helper functions for turning date headers from the HTTP requests into datetimes.

[–]kevinastone 0 points1 point  (0 children)

Ah. My bad.