<p align="center">
<img src="https://raw.githubusercontent.com/vovchic17/static/refs/heads/main/src/aiosend.png" align="center"/>
<h1 align="center">aiosend</h1>
</p>
[![Python](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/vovchic17/static/main/src/badges/python310_313.json)](https://www.python.org/)
[![Crypto Pay API](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/vovchic17/static/refs/heads/main/src/badges/cryptopayapi.json)](https://help.crypt.bot/crypto-pay-api)
[![Documentation Status](https://readthedocs.org/projects/aiosend/badge/?version=latest)](https://aiosend.readthedocs.io/en/latest/?badge=latest)
[![Pydantic v2](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydantic/pydantic/main/docs/badge/v2.json)](https://pydantic.dev)
[![Aiohttp](https://img.shields.io/badge/aiohttp-v3-2c5bb4?logo=aiohttp)](https://docs.aiohttp.org/en/stable/)
[![Code linter: ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/charliermarsh/ruff)
[![Checked with mypy](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/vovchic17/static/main/src/badges/mypy.json)](https://mypy-lang.org/)
**aiosend** is a syncronous & asynchronous [Crypto Pay API](https://help.crypt.bot/crypto-pay-api) client.
> ## [Official documentation](https://aiosend.readthedocs.io/en/latest/)
> ## [<img src="https://raw.githubusercontent.com/vovchic17/static/refs/heads/main/src/telegram_logo.svg" width="30" align="top"> Telegram chat](https://aiosend.t.me/)
## Quick start
```python
import asyncio
from aiosend import CryptoPay
async def main():
cp = CryptoPay(token="TOKEN")
app = await cp.get_me()
print(app.name) # Your App Name
if __name__ == "__main__":
asyncio.run(main())
```
## aiogram 3.x integration example
```python
import asyncio
from aiogram import Bot, Dispatcher
from aiosend import CryptoPay
cp = CryptoPay("TOKEN")
bot = Bot("TOKEN")
dp = Dispatcher()
@dp.message()
async def get_invoice(message):
invoice = await cp.create_invoice(1, "USDT")
await message.answer(f"pay: {invoice.bot_invoice_url}")
invoice.await_payment(message=message)
@cp.polling_handler()
async def handle_payment(invoice, message):
await message.answer(f"invoice #{invoice.invoice_id} has been paid")
async def main():
await asyncio.gather(
dp.start_polling(bot),
cp.start_polling(),
)
if __name__ == "__main__":
asyncio.run(main())
```
Raw data
{
"_id": null,
"home_page": "https://github.com/vovchic17/",
"name": "aiosend",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "crypto pay, CryptoBot, Crypto Pay API",
"author": "VoVcHiC",
"author_email": "tsvetkovvova17@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/42/f4/6da78f8d5f1e802d32878a630c0349a3ca5fbc1333b826261a9f2d94afb1/aiosend-1.0.2.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n <img src=\"https://raw.githubusercontent.com/vovchic17/static/refs/heads/main/src/aiosend.png\" align=\"center\"/>\n <h1 align=\"center\">aiosend</h1>\n</p>\n\n[![Python](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/vovchic17/static/main/src/badges/python310_313.json)](https://www.python.org/)\n[![Crypto Pay API](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/vovchic17/static/refs/heads/main/src/badges/cryptopayapi.json)](https://help.crypt.bot/crypto-pay-api)\n[![Documentation Status](https://readthedocs.org/projects/aiosend/badge/?version=latest)](https://aiosend.readthedocs.io/en/latest/?badge=latest)\n[![Pydantic v2](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydantic/pydantic/main/docs/badge/v2.json)](https://pydantic.dev)\n[![Aiohttp](https://img.shields.io/badge/aiohttp-v3-2c5bb4?logo=aiohttp)](https://docs.aiohttp.org/en/stable/)\n[![Code linter: ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/charliermarsh/ruff)\n[![Checked with mypy](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/vovchic17/static/main/src/badges/mypy.json)](https://mypy-lang.org/)\n\n**aiosend** is a syncronous & asynchronous [Crypto Pay API](https://help.crypt.bot/crypto-pay-api) client.\n\n> ## [Official documentation](https://aiosend.readthedocs.io/en/latest/)\n> ## [<img src=\"https://raw.githubusercontent.com/vovchic17/static/refs/heads/main/src/telegram_logo.svg\" width=\"30\" align=\"top\"> Telegram chat](https://aiosend.t.me/)\n\n\n## Quick start\n```python\nimport asyncio\nfrom aiosend import CryptoPay\n\n\nasync def main():\n cp = CryptoPay(token=\"TOKEN\")\n app = await cp.get_me()\n print(app.name) # Your App Name\n\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n```\n\n## aiogram 3.x integration example\n\n```python\nimport asyncio\nfrom aiogram import Bot, Dispatcher\nfrom aiosend import CryptoPay\n\ncp = CryptoPay(\"TOKEN\")\nbot = Bot(\"TOKEN\")\ndp = Dispatcher()\n\n\n@dp.message()\nasync def get_invoice(message):\n invoice = await cp.create_invoice(1, \"USDT\")\n await message.answer(f\"pay: {invoice.bot_invoice_url}\")\n invoice.await_payment(message=message)\n\n\n@cp.polling_handler()\nasync def handle_payment(invoice, message):\n await message.answer(f\"invoice #{invoice.invoice_id} has been paid\")\n\n\nasync def main():\n await asyncio.gather(\n dp.start_polling(bot),\n cp.start_polling(),\n )\n\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n```\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "sync & async Crypto Pay API client.",
"version": "1.0.2",
"project_urls": {
"Documentation": "https://aiosend.rtfd.io/en/latest/",
"Homepage": "https://github.com/vovchic17/",
"Repository": "https://github.com/vovchic17/"
},
"split_keywords": [
"crypto pay",
" cryptobot",
" crypto pay api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0f322309564086b915435b755d2b496559c9feed517ee8e2677640e7cee6ce2c",
"md5": "36fe378f2696dfcf93107782655bfe5d",
"sha256": "3ea9fbb9a5d0a713c1187f19e697327023db243e8b618d99b59479aa17a1e274"
},
"downloads": -1,
"filename": "aiosend-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "36fe378f2696dfcf93107782655bfe5d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 44899,
"upload_time": "2025-01-19T14:23:21",
"upload_time_iso_8601": "2025-01-19T14:23:21.705151Z",
"url": "https://files.pythonhosted.org/packages/0f/32/2309564086b915435b755d2b496559c9feed517ee8e2677640e7cee6ce2c/aiosend-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "42f46da78f8d5f1e802d32878a630c0349a3ca5fbc1333b826261a9f2d94afb1",
"md5": "c31d316731d109c0ea7e7a80ee8080fd",
"sha256": "311114d96a2c06b242474b7d3cf1f285c4bd83b61c359642252ee9be5b48beb7"
},
"downloads": -1,
"filename": "aiosend-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "c31d316731d109c0ea7e7a80ee8080fd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 24407,
"upload_time": "2025-01-19T14:23:24",
"upload_time_iso_8601": "2025-01-19T14:23:24.405957Z",
"url": "https://files.pythonhosted.org/packages/42/f4/6da78f8d5f1e802d32878a630c0349a3ca5fbc1333b826261a9f2d94afb1/aiosend-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-19 14:23:24",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "aiosend"
}