Skip to main content

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


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.1.1.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

milkpay_cryptopay-1.1.1-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file milkpay_cryptopay-1.1.1.tar.gz.

File metadata

  • Download URL: milkpay_cryptopay-1.1.1.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for milkpay_cryptopay-1.1.1.tar.gz
Algorithm Hash digest
SHA256 9fe8da2a59a6bfd3204555e1b1ba9365dc97452d7d627dad0adb672369e350da
MD5 3159044592a393e172ea5ff4b79158cc
BLAKE2b-256 1e0257f651075dbc3a4158f0be77a8e7ac467edb717efb9d65c31d70404f00a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for milkpay_cryptopay-1.1.1.tar.gz:

Publisher: pypi-release.yml on py-stollen/milkpay-cryptopay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file milkpay_cryptopay-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for milkpay_cryptopay-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 133df0cdc3a2a9201dd539f54ce04705dec3c34993c7c745df6689c288eff90f
MD5 274c16f85bd504ee25e237687c4bafdc
BLAKE2b-256 4c14a92ba185543d0233fa9c7d87842096c445c7260766c6bee869a2007d6e63

See more details on using hashes here.

Provenance

The following attestation bundles were made for milkpay_cryptopay-1.1.1-py3-none-any.whl:

Publisher: pypi-release.yml on py-stollen/milkpay-cryptopay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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