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 details)
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | df0ac97322b8c09d7e7ee27c398247424bdd572ff92ce53496724a8ffe2ed1c8 |
|
MD5 | 6d7b9bdf0bbdaed33ec15953372fe3e2 |
|
BLAKE2b-256 | 58ca7d1d99ac63300b036ea4789e29675df9c71e0385b5a7c588d475485b40fe |
File details
Details for the file BlockPayments-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: BlockPayments-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23f20afb46abc634380821f738d5ec676810de58938fb70da2a8bf0a20df590f |
|
MD5 | 66c76cc45f86898404bed40027c04393 |
|
BLAKE2b-256 | b4e556eace9c154cc06ed9e702b54cfcc8bb24c9afe0ce546f5847ee7b2cb43f |