everPay Python SDK Documentation

Frame 38578 (1).png

The Arweave Asia Summer Hackathon, co-hosted by PermaDAO, SCPVenture, and TintinLand, has officially begun and is now open for registration! To enable developers to seamlessly develop on Arweave, we will be sharing a series of user-friendly development tools. In this edition, we will introduce the everPay Python SDK.

The everPay Python SDK is an officially maintained lightweight Python SDK that serves as a tool library for accessing the everPay API. The source code is available on the GitHub repository. The main purpose of the Python SDK is to assist Python developers in quickly utilizing the everPay protocol for development and serve as a supplementary integration tutorial for everPay.

Install Python SDK

Install via pip

pip install everpay

Set up wallet

everPay supports Ethereum and Arweave wallets for transactions.

import everpay
#everPay provides a test environment 'https://api_dev.everpay.io'
api_server = '<https://api.everpay.io>'
#Set up the private key of the Ethereum wallet account
pk = ''
signer = everpay.ETHSigner(pk)
account = everpay.Account(api_server, signer)
#Set up an Arweave wallet account
signer = everpay.ARSigner('arweave-keyfile-xxx.json')
account = everpay.Account(api_server, signer)

Query everPay related information

Support queries for the following information

Please provide the address and token name as parameters for the query.

import everpay
api_server = '<https://api.everpay.io>'
client = everpay.Client(api_server)
#Query the basic information of the everPay protocol, including lock-up address, supported tokens and other information
info = client.get_info()
#Query the list of tokens supported by the everPay protocol
support_tokens = client.get_support_tokens()
#everPay protocol supports the labeling of tokens and related asset issuance protogenesis chain information
token_list = client.get_token_list()
#Account asset information query
ar_balance = client.get_balance('0x5609FEc21fa681369e742994ca5D88B034D98E2F', 'ar')

Transfer transactions

The transfer method of everPay Python SDK can send transfer request. For each transfer, the following parameters need to be provided: