Skip to main content

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


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)

Uploaded Source

Built Distribution

BlockPayments-0.0.1-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page