For this hackathon, I'm thinking of building a python binding for the web monetization API. Here's what I have in mind:
According to the docs, if you want to check if a user is web monetized, you check the state using:
You would then proceed to implement your logic based on the state.
As a backend python developer, it would be cool if I could do that in python. If I'm using Flask for example, and I have a monetized route, I would want to write something like:
from monetize import check_state @app.route('/monetized') def monetized_page(): state = check_state() if state == 'started': # implement logic to offer monetized content else: # do something else
I believe something like this would make it easier to implement the monetization API for python developers working with web frameworks like flask and django.