A lightweight CryptoPay SDK
Project description
milkpay is a set of lightweight crypto payment system SDKs.
Installation
pip install -U milkpay-cryptopay
Simple example
import asyncio
import logging
import uuid
from typing import Final
from milkpay.cryptopay import Cryptopay
from milkpay.cryptopay.enums import Asset
API_TOKEN: Final[str] = "API_TOKEN_HERE"
async def main() -> None:
logging.basicConfig(level=logging.DEBUG)
async with Cryptopay(
api_token=API_TOKEN,
production=False,
force_detailed_errors=True,
) as cryptopay:
logging.info(
await cryptopay.transfer(
user_id=5945468457,
asset=Asset.USDT,
amount=1.1,
spend_id=int(uuid.uuid4()),
)
)
if __name__ == "__main__":
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
milkpay_cryptopay-1.0.tar.gz
(9.8 kB
view hashes)
Built Distribution
Close
Hashes for milkpay_cryptopay-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3411d3c854591ee991186e1fa849bad6b4928ed2011155d7298c2977024006cd |
|
MD5 | a22c19777539b7409a91d82b93d29f51 |
|
BLAKE2b-256 | a3818dc6e7a28f497290246b3a77dff3bc47948f2991d205d1022e9cc054d7a3 |