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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file BlockPayments-0.0.1.tar.gz.

File metadata

  • Download URL: BlockPayments-0.0.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for BlockPayments-0.0.1.tar.gz
Algorithm Hash digest
SHA256 df0ac97322b8c09d7e7ee27c398247424bdd572ff92ce53496724a8ffe2ed1c8
MD5 6d7b9bdf0bbdaed33ec15953372fe3e2
BLAKE2b-256 58ca7d1d99ac63300b036ea4789e29675df9c71e0385b5a7c588d475485b40fe

See more details on using hashes here.

File details

Details for the file BlockPayments-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for BlockPayments-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 23f20afb46abc634380821f738d5ec676810de58938fb70da2a8bf0a20df590f
MD5 66c76cc45f86898404bed40027c04393
BLAKE2b-256 b4e556eace9c154cc06ed9e702b54cfcc8bb24c9afe0ce546f5847ee7b2cb43f

See more details on using hashes here.

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