Skip to main content

21: Build the Machine-Payable Web Build Status

21 logo

21 is an open source Python library and command line interface for quickly building machine-payable web services. It allows you to accomplish three major tasks:

  • Get bitcoin on any device
  • Add bitcoin micropayments to any Django or Flask app
  • Earn bitcoin on every HTTP request

The package includes:

  • an HD wallet to securely manage your bitcoin
  • crypto and bitcoin libraries to build bitcoin/blockchain applications
  • a micropayment-channels client and server
  • commands for mining, buying, and earning bitcoin, as well as requesting it from the 21 faucet
  • tools for publishing machine-payable endpoints to the 21 Marketplace
  • containers that allow your machine to sell machine resources for bitcoin

and much more.

Security

Please note that the 21 software is in beta. To protect the security of your systems while using 21, we highly recommend you install the software on a device other than your main laptop (e.g. 21 Bitcoin Computer, an old laptop, or an Amazon Virtual Machine) while the product is still in beta. You can read more security-related information here. Please send an email to security@21.co regarding any issue concerning security.

Installation

Create an account or install the library and CLI (python3.4+ is required):

$ curl https://21.co | sh

two1 can also be installed via pip:

$ sudo pip3 install two1

Start with the command line tool:

$ 21 help

Then read the Introduction to 21 guide and the two1 documentation.

Developers

To edit and run the two1 source code:

$ git clone https://github.com/21dotco/two1-python.git
$ cd two1-python/
$ pip3 install -r requirements.txt  # Install the requirements
$ pip3 install -e .  # Install 21 as an editable python library

Your changes to the source will now be reflected in your system installation in real-time.

Docker

You can pull Docker images with two1 pre-installed from the 21 Docker Hub repository.

$ docker pull 21dotco/two1

Then run the latest base image:

$ docker run -it 21dotco/two1 sh

Community

Join the 21 developer community to chat with other users or to get in touch with support.

Licensing

two1 is licensed under the FreeBSD License. See LICENSE for the full license text.

Release files for two1-fork 3.11.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for two1-fork 3.11.1
File Size Uploaded
two1_fork-3.11.1.tar.gz 12.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for two1-fork 3.11.1
File Interpreter ABI Platform
two1_fork-3.11.1-py3-none-any.whl Python 3 none any Details

Total release size: 13.3 MB

Release files / two1_fork-3.11.1.tar.gz

Download URL two1_fork-3.11.1.tar.gz
Size 12.9 MB
Tags Source
SHA-256 checksum
How to use checksums
bb5de421f4d6c4ac43728d3d0443b92e2dd2909ecae3834fa46faddf1435d405
BLAKE2b-256 checksum
How to use checksums
f9df4aec6990edaadb70b5c35541ba5d340a256f26b04341710905e4830caf09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release files / two1_fork-3.11.1-py3-none-any.whl

Download URL two1_fork-3.11.1-py3-none-any.whl
Size 423.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e7856133cfdcbb72c724c1edee8ae964a73be9873a0c9472317f23b4622f8e3
BLAKE2b-256 checksum
How to use checksums
334b2cf94712ce4b2601240757af8aea99d917d18bd69c5a2fffa360f7c5fbc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

3.11.1 This release

2 release files

3.11.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page