Skip to main content

async-crypto-pay-api

PyPI version Python versions License

Async Crypto Pay API wrapper for Telegram Crypto Bot written in Python 3.10+.

Requirements

  • Python 3.10 or higher
  • Valid Crypto Bot API token (get one here)

Installation

pip install async-crypto-pay-api

Example

from asyncio import run
from async_crypto_pay_api import CryptoPayApi
from async_crypto_pay_api.models import CurrencyType, FiatAsset

crypto = CryptoPayApi("{token}")

async def main() -> None:
    # Context manager handles connection lifecycle
    async with crypto:
        app_info = await crypto.get_me()
        print(app_info.model_dump_json(indent=4))

        # Create payment invoice
        invoice = await crypto.create_invoice(
            currency_type=CurrencyType.FIAT,
            fiat=FiatAsset.USD,
            amount=100,
        )
        print(f"Invoice URL: {invoice.bot_invoice_url}")

run(main())

License

This project is licensed under the GNU Lesser General Public License v3.0 only. See LICENSE for details.

Contributing

Contributions are welcome! Please open an issue or submit a PR for:

  • Bug fixes
  • New features
  • Documentation improvements

Metadata

Release files for async-crypto-pay-api 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for async-crypto-pay-api 1.2.0
File Size Uploaded
async_crypto_pay_api-1.2.0.tar.gz 61.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for async-crypto-pay-api 1.2.0
File Interpreter ABI Platform
async_crypto_pay_api-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 74.6 kB

Release files / async_crypto_pay_api-1.2.0.tar.gz

Download URL async_crypto_pay_api-1.2.0.tar.gz
Size 61.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f43730462bcae012c7f1b1d9dde8d0f5ec79eb3dce31e75bf457b2bc69dc114f
BLAKE2b-256 checksum
How to use checksums
c187ba746305abe3869837c3779fcd524316de8489f0ea33333c55ef4790c1f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.20

Release files / async_crypto_pay_api-1.2.0-py3-none-any.whl

Download URL async_crypto_pay_api-1.2.0-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
39e436bce29f291c07955b9878272b008ffab11761fce4fbc09de0aece7e6dab
BLAKE2b-256 checksum
How to use checksums
e4df802f99868cc82908758d3888a0e5b477c4f62cef1acbfb09517a267b0b4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.20

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page