21 makes bitcoin useful for developers.
21 allows you to earn bitcoin on every HTTP request. Start by installing 21 (Beta) on any internet-connected device to get some bitcoin. Then use 21 to build, buy, and sell machine-payable apps with developers all around the world.Install 21 BETA >
1 2 3 4 5 6 7 8 9 10
import flask from two1.wallet import Wallet from two1.bitserv.flask import Payment app = flask.Flask(__name__) payment = Payment(app, Wallet()) @app.route('/hello') @payment.required(5000) def hello(): return 'Hello, Bitcoin!'