<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>
[](https://www.python.org/)
[](https://help.crypt.bot/crypto-pay-api)
[](https://aiosend.readthedocs.io/en/latest/?badge=latest)
[](https://pydantic.dev)
[](https://docs.aiohttp.org/en/stable/)
[](https://github.com/charliermarsh/ruff)
[](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.poll(message=message)
@cp.invoice_polling()
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 Bot, Crypto Pay API, cryptopayapi, cryptobot, CryptoPayAPI, crypto pay api",
"author": "VoVcHiC",
"author_email": "tsvetkovvova17@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/e0/9e/f2f6aad4fa14eb0cd050bf513aeb84ff98eaef1d451a0dd5d19b67ab7313/aiosend-2.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[](https://www.python.org/)\n[](https://help.crypt.bot/crypto-pay-api)\n[](https://aiosend.readthedocs.io/en/latest/?badge=latest)\n[](https://pydantic.dev)\n[](https://docs.aiohttp.org/en/stable/)\n[](https://github.com/charliermarsh/ruff)\n[](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.poll(message=message)\n\n\n@cp.invoice_polling()\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": "2.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 bot",
" crypto pay api",
" cryptopayapi",
" cryptobot",
" cryptopayapi",
" crypto pay api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "db894301d98eded3a385042ce5cf724d1ea7bbfe3716394656d1827546fed610",
"md5": "e38e4d1517b3199b78947b6c110085d0",
"sha256": "879c5446996680cb4ad353ba6137429ad1572e7fa2088a8f3ac04acaaab88174"
},
"downloads": -1,
"filename": "aiosend-2.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e38e4d1517b3199b78947b6c110085d0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 49523,
"upload_time": "2025-02-05T18:35:14",
"upload_time_iso_8601": "2025-02-05T18:35:14.320774Z",
"url": "https://files.pythonhosted.org/packages/db/89/4301d98eded3a385042ce5cf724d1ea7bbfe3716394656d1827546fed610/aiosend-2.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e09ef2f6aad4fa14eb0cd050bf513aeb84ff98eaef1d451a0dd5d19b67ab7313",
"md5": "3c7807b058ed3862d4fdbcbb265fb84a",
"sha256": "bb525cd9396919bc9079f409820bde245ac3816ccc018a84873d6ee99a5bf9ed"
},
"downloads": -1,
"filename": "aiosend-2.0.2.tar.gz",
"has_sig": false,
"md5_digest": "3c7807b058ed3862d4fdbcbb265fb84a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 26406,
"upload_time": "2025-02-05T18:35:15",
"upload_time_iso_8601": "2025-02-05T18:35:15.956538Z",
"url": "https://files.pythonhosted.org/packages/e0/9e/f2f6aad4fa14eb0cd050bf513aeb84ff98eaef1d451a0dd5d19b67ab7313/aiosend-2.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-05 18:35:15",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "aiosend"
}