A Python wrapper for the BlockPayments API.
Project description
BlockPayments.py
BlockPayments python api wrapper
Examples:
"""This example will use sincronous requests."""
from BlockPayments import BlockPayments
blockpayments = BlockPaymets("my_api_key")
# Get a payment url
print(blockpayments.get_payment_url(
user_id=123 # replace with your telegram user id
amount=0.001 # replace with the amount of the currency you want to receive
currency="BTC" # replace with the currency you want to receive (BTC, ETH, LTC or BSC)
))
"""This example will use asincronous requests."""
from BlockPayments import AsyncBlockPayments
import asyncio
blockpayments = AsyncBlockPaymets("my_api_key")
async def main():
# Get a payment url
print(await blockpayments.get_payment_url(
user_id=123 # replace with your telegram user id
amount=0.001 # replace with the amount of the currency you want to receive
currency="BTC" # replace with the currency you want to receive (BTC, ETH, LTC or BSC)
))
asyncio.run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
BlockPayments-0.0.1.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for BlockPayments-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23f20afb46abc634380821f738d5ec676810de58938fb70da2a8bf0a20df590f |
|
MD5 | 66c76cc45f86898404bed40027c04393 |
|
BLAKE2b-256 | b4e556eace9c154cc06ed9e702b54cfcc8bb24c9afe0ce546f5847ee7b2cb43f |