I've been talking with a few developer friends about libraries lately, and this one has made me realize what they're saying. As Python developers, DSLs are completely not in our DNA, but this library strikes me as something that would look much more Pythonic with a DSL.
Wouldn't it be better to have descriptions of:
Every day at 10:30 do myfunc
Every Monday do otherfunc
Every hour do whatever
Rather than the current .every().day.at("10:30").do(myfunc)?
I find it hard to appreciate these inventive types of API design. Something more traditional and boring, like Celery's crontab[1] or dateutils rrule[2] seem quite sufficient. For example:
I'm not sure why, given two equally flexible designs, we should choose the least expressive. The fact that cron is sufficient doesn't mean I don't still have to google how to run things every three hours every second Monday, for example.
I'd rather have neither. I particularly dislike the .every().day.at("10:30").do(myfunc) thing where methods and attributes are abused in order to artificially make it read like a sentence.
This is not Pythonic at all <troll>it's like some childish Ruby code</troll>
Wouldn't it be better to have descriptions of:
Every day at 10:30 do myfunc
Every Monday do otherfunc
Every hour do whatever
Rather than the current .every().day.at("10:30").do(myfunc)?