async-icq


Nameasync-icq JSON
Version 1.3.8 PyPI version JSON
download
home_pagehttps://github.com/dasshit/async-icq
SummaryICQ/VK Teams Bot API interface
upload_time2023-09-12 23:33:00
maintainer
docs_urlNone
authorValerii Korobov
requires_python>=3.5
license
keywords mailru im bot api
VCS
bugtrack_url
requirements aiohttp aiologger aiosignal async-timeout attrs charset-normalizer frozenlist idna multidict yarl uvloop ujson
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Async ICQ/VK Teams bot API wrapper

[![PyPi Package Version](https://img.shields.io/pypi/v/async_icq)](https://pypi.org/project/async-icq/)
[![PyPi Package Status](https://img.shields.io/pypi/status/async_icq?color=green&label=stable)](https://pypi.org/project/async-icq/)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/async_icq)](https://pypi.org/project/async-icq/)
[![Package dwn stats](https://img.shields.io/pypi/dm/async_icq)](https://pypi.org/project/async-icq/)
[![License](https://img.shields.io/github/license/dasshit/async-icq)](https://pypi.org/project/async-icq/)
[![Repo size](https://img.shields.io/github/repo-size/dasshit/async-icq)](https://pypi.org/project/async-icq/)
[![Author stars count](https://img.shields.io/github/stars/dasshit?style=social)](https://pypi.org/project/async-icq/)

<img src="https://icq.com/botapi/res/logo_icq_new.png" width="40%"><img src="https://myteam.mail.ru/botapi/res/logo_myteam.png" width="40%">

Pure Async Python interface for Bot API.

# Table of contents
- [Introduction](#introduction)
- [Quick start](#quick-start)
- [Installing](#installing)
- [Examples](#examples) 
- [API description](#api-description)

# Introduction


This library provides complete ICQ/Myteam Bot API 1.0 interface and requires Python 3.5+

# Quick start

* Create your own bot by sending the /newbot command to <a href="https://icq.com/people/70001">Metabot</a> and follow the instructions.
    >Note: a bot can only reply after the user has added it to his contact list, or if the user was the first to start a dialogue.
* You can configure the domain that hosts your ICQ server. When instantiating the Bot class, add the address of your domain.
    > Example: Bot(token=TOKEN, url="https://api.icq.net"), by default we use the domain: https://api.icq.net (ICQ) or http://myteam.mail.ru (VK Teams)

# Installing

Install using pip:
```bash
pip install -U async-icq
```

Install from sources:
```bash
git clone https://github.com/dasshit/async-icq.git
cd async-icq
python setup.py install
```

# Examples

Basic example of using this library will look like this

```python
from async_icq.bot import AsyncBot
from async_icq.events import Event

# Creating bot
example = AsyncBot(
  token='TOKEN',
  url='https://api.icq.net',
)


# Adding some basic event handler by decorators (handler must accept 2 arguments: bot and event)
# Diffent decorators will set it up for diffent types of events
@example.message_handler()
async def hello(event: Event):
  
  await event.answer(
    text=f'Hi, {event.from_.userId}'
  )

  await event.log(
    f'Answered to {event.chat.chatId} to {event.from_.userId}')


# Starting to poll new events and sending them to middleware and handlers
example.start_poll()
```

Example of how to use this library could be found in async-icq/examples

# API description
<ul>
    <li><a href="https://icq.com/botapi/">icq.com/botapi/</a></li>
    <li><a href="https://agent.mail.ru/botapi/">agent.mail.ru/botapi/</a></li>
    <li><a href="https://myteam.mail.ru/botapi/">myteam.mail.ru/botapi/</a></li>
</ul>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dasshit/async-icq",
    "name": "async-icq",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.5",
    "maintainer_email": "",
    "keywords": "mailru im bot api",
    "author": "Valerii Korobov",
    "author_email": "dasshit@yandex.ru",
    "download_url": "https://files.pythonhosted.org/packages/e9/d6/6332a67eb31774be50b6d35f084641db645469d6a9c097010abb1b2a7ee0/async_icq-1.3.8.tar.gz",
    "platform": null,
    "description": "# Async ICQ/VK Teams bot API wrapper\n\n[![PyPi Package Version](https://img.shields.io/pypi/v/async_icq)](https://pypi.org/project/async-icq/)\n[![PyPi Package Status](https://img.shields.io/pypi/status/async_icq?color=green&label=stable)](https://pypi.org/project/async-icq/)\n[![Supported Python versions](https://img.shields.io/pypi/pyversions/async_icq)](https://pypi.org/project/async-icq/)\n[![Package dwn stats](https://img.shields.io/pypi/dm/async_icq)](https://pypi.org/project/async-icq/)\n[![License](https://img.shields.io/github/license/dasshit/async-icq)](https://pypi.org/project/async-icq/)\n[![Repo size](https://img.shields.io/github/repo-size/dasshit/async-icq)](https://pypi.org/project/async-icq/)\n[![Author stars count](https://img.shields.io/github/stars/dasshit?style=social)](https://pypi.org/project/async-icq/)\n\n<img src=\"https://icq.com/botapi/res/logo_icq_new.png\" width=\"40%\"><img src=\"https://myteam.mail.ru/botapi/res/logo_myteam.png\" width=\"40%\">\n\nPure Async Python interface for Bot API.\n\n# Table of contents\n- [Introduction](#introduction)\n- [Quick start](#quick-start)\n- [Installing](#installing)\n- [Examples](#examples) \n- [API description](#api-description)\n\n# Introduction\n\n\nThis library provides complete ICQ/Myteam Bot API 1.0 interface and requires Python 3.5+\n\n# Quick start\n\n* Create your own bot by sending the /newbot command to <a href=\"https://icq.com/people/70001\">Metabot</a> and follow the instructions.\n    >Note: a bot can only reply after the user has added it to his contact list, or if the user was the first to start a dialogue.\n* You can configure the domain that hosts your ICQ server. When instantiating the Bot class, add the address of your domain.\n    > Example: Bot(token=TOKEN, url=\"https://api.icq.net\"), by default we use the domain: https://api.icq.net (ICQ) or http://myteam.mail.ru (VK Teams)\n\n# Installing\n\nInstall using pip:\n```bash\npip install -U async-icq\n```\n\nInstall from sources:\n```bash\ngit clone https://github.com/dasshit/async-icq.git\ncd async-icq\npython setup.py install\n```\n\n# Examples\n\nBasic example of using this library will look like this\n\n```python\nfrom async_icq.bot import AsyncBot\nfrom async_icq.events import Event\n\n# Creating bot\nexample = AsyncBot(\n  token='TOKEN',\n  url='https://api.icq.net',\n)\n\n\n# Adding some basic event handler by decorators (handler must accept 2 arguments: bot and event)\n# Diffent decorators will set it up for diffent types of events\n@example.message_handler()\nasync def hello(event: Event):\n  \n  await event.answer(\n    text=f'Hi, {event.from_.userId}'\n  )\n\n  await event.log(\n    f'Answered to {event.chat.chatId} to {event.from_.userId}')\n\n\n# Starting to poll new events and sending them to middleware and handlers\nexample.start_poll()\n```\n\nExample of how to use this library could be found in async-icq/examples\n\n# API description\n<ul>\n    <li><a href=\"https://icq.com/botapi/\">icq.com/botapi/</a></li>\n    <li><a href=\"https://agent.mail.ru/botapi/\">agent.mail.ru/botapi/</a></li>\n    <li><a href=\"https://myteam.mail.ru/botapi/\">myteam.mail.ru/botapi/</a></li>\n</ul>\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "ICQ/VK Teams Bot API interface",
    "version": "1.3.8",
    "project_urls": {
        "Homepage": "https://github.com/dasshit/async-icq"
    },
    "split_keywords": [
        "mailru",
        "im",
        "bot",
        "api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ba6fdb72b047dec6fa80df45292361f09186fef88713b3a304283131b5e8f541",
                "md5": "0f12a9d3aef462ee495d3ea16d0d5370",
                "sha256": "4396e74b3d3e85d1ff0d04a572ecfe544f19bc4208681a85530cd0cc77e9398c"
            },
            "downloads": -1,
            "filename": "async_icq-1.3.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0f12a9d3aef462ee495d3ea16d0d5370",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.5",
            "size": 16767,
            "upload_time": "2023-09-12T23:32:59",
            "upload_time_iso_8601": "2023-09-12T23:32:59.114970Z",
            "url": "https://files.pythonhosted.org/packages/ba/6f/db72b047dec6fa80df45292361f09186fef88713b3a304283131b5e8f541/async_icq-1.3.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e9d66332a67eb31774be50b6d35f084641db645469d6a9c097010abb1b2a7ee0",
                "md5": "bb2e7b9509fce3d6d16a44c7aa575956",
                "sha256": "853d735d98c2fa059a7936821bdafb871d963334351cf031ea746f107c926f0b"
            },
            "downloads": -1,
            "filename": "async_icq-1.3.8.tar.gz",
            "has_sig": false,
            "md5_digest": "bb2e7b9509fce3d6d16a44c7aa575956",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.5",
            "size": 19579,
            "upload_time": "2023-09-12T23:33:00",
            "upload_time_iso_8601": "2023-09-12T23:33:00.457725Z",
            "url": "https://files.pythonhosted.org/packages/e9/d6/6332a67eb31774be50b6d35f084641db645469d6a9c097010abb1b2a7ee0/async_icq-1.3.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-12 23:33:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dasshit",
    "github_project": "async-icq",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "aiohttp",
            "specs": [
                [
                    ">=",
                    "3.8.1"
                ]
            ]
        },
        {
            "name": "aiologger",
            "specs": [
                [
                    ">=",
                    "0.6.1"
                ]
            ]
        },
        {
            "name": "aiosignal",
            "specs": [
                [
                    ">=",
                    "1.2.0"
                ]
            ]
        },
        {
            "name": "async-timeout",
            "specs": [
                [
                    ">=",
                    "4.0.2"
                ]
            ]
        },
        {
            "name": "attrs",
            "specs": [
                [
                    ">=",
                    "21.4.0"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    ">=",
                    "2.0.10"
                ]
            ]
        },
        {
            "name": "frozenlist",
            "specs": [
                [
                    ">=",
                    "1.2.0"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    ">=",
                    "3.3"
                ]
            ]
        },
        {
            "name": "multidict",
            "specs": [
                [
                    ">=",
                    "5.2.0"
                ]
            ]
        },
        {
            "name": "yarl",
            "specs": [
                [
                    ">=",
                    "1.7.2"
                ]
            ]
        },
        {
            "name": "uvloop",
            "specs": [
                [
                    "==",
                    "0.16.0"
                ]
            ]
        },
        {
            "name": "ujson",
            "specs": [
                [
                    "==",
                    "5.1.0"
                ]
            ]
        }
    ],
    "test_requirements": [
        {
            "name": "aiohttp",
            "specs": [
                [
                    "==",
                    "3.8.5"
                ]
            ]
        },
        {
            "name": "aiologger",
            "specs": [
                [
                    "==",
                    "0.6.1"
                ]
            ]
        },
        {
            "name": "aiosignal",
            "specs": [
                [
                    "==",
                    "1.2.0"
                ]
            ]
        },
        {
            "name": "async-timeout",
            "specs": [
                [
                    "==",
                    "4.0.2"
                ]
            ]
        },
        {
            "name": "attrs",
            "specs": [
                [
                    "==",
                    "21.4.0"
                ]
            ]
        },
        {
            "name": "bleach",
            "specs": [
                [
                    "==",
                    "4.1.0"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2023.7.22"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    "==",
                    "2.0.10"
                ]
            ]
        },
        {
            "name": "colorama",
            "specs": [
                [
                    "==",
                    "0.4.4"
                ]
            ]
        },
        {
            "name": "docutils",
            "specs": [
                [
                    "==",
                    "0.18.1"
                ]
            ]
        },
        {
            "name": "frozenlist",
            "specs": [
                [
                    "==",
                    "1.2.0"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.3"
                ]
            ]
        },
        {
            "name": "importlib-metadata",
            "specs": [
                [
                    "==",
                    "4.10.1"
                ]
            ]
        },
        {
            "name": "iniconfig",
            "specs": [
                [
                    "==",
                    "1.1.1"
                ]
            ]
        },
        {
            "name": "keyring",
            "specs": [
                [
                    "==",
                    "23.5.0"
                ]
            ]
        },
        {
            "name": "memory-profiler",
            "specs": [
                [
                    "==",
                    "0.60.0"
                ]
            ]
        },
        {
            "name": "multidict",
            "specs": [
                [
                    "==",
                    "5.2.0"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "21.3"
                ]
            ]
        },
        {
            "name": "pkginfo",
            "specs": [
                [
                    "==",
                    "1.8.2"
                ]
            ]
        },
        {
            "name": "pluggy",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "psutil",
            "specs": [
                [
                    "==",
                    "5.9.0"
                ]
            ]
        },
        {
            "name": "py",
            "specs": [
                [
                    "==",
                    "1.11.0"
                ]
            ]
        },
        {
            "name": "Pygments",
            "specs": [
                [
                    "==",
                    "2.15.0"
                ]
            ]
        },
        {
            "name": "pyparsing",
            "specs": [
                [
                    "==",
                    "3.0.7"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "6.2.5"
                ]
            ]
        },
        {
            "name": "pytest-asyncio",
            "specs": [
                [
                    "==",
                    "0.17.2"
                ]
            ]
        },
        {
            "name": "pytest-xdist",
            "specs": [
                [
                    "==",
                    "2.5.0"
                ]
            ]
        },
        {
            "name": "readme-renderer",
            "specs": [
                [
                    "==",
                    "32.0"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.31.0"
                ]
            ]
        },
        {
            "name": "requests-toolbelt",
            "specs": [
                [
                    "==",
                    "0.9.1"
                ]
            ]
        },
        {
            "name": "rfc3986",
            "specs": [
                [
                    "==",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "six",
            "specs": [
                [
                    "==",
                    "1.16.0"
                ]
            ]
        },
        {
            "name": "toml",
            "specs": [
                [
                    "==",
                    "0.10.2"
                ]
            ]
        },
        {
            "name": "tqdm",
            "specs": [
                [
                    "==",
                    "4.62.3"
                ]
            ]
        },
        {
            "name": "twine",
            "specs": [
                [
                    "==",
                    "3.7.1"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "1.26.8"
                ]
            ]
        },
        {
            "name": "webencodings",
            "specs": [
                [
                    "==",
                    "0.5.1"
                ]
            ]
        },
        {
            "name": "yarl",
            "specs": [
                [
                    "==",
                    "1.7.2"
                ]
            ]
        },
        {
            "name": "zipp",
            "specs": [
                [
                    "==",
                    "3.7.0"
                ]
            ]
        },
        {
            "name": "uvloop",
            "specs": [
                [
                    "==",
                    "0.16.0"
                ]
            ]
        },
        {
            "name": "ujson",
            "specs": [
                [
                    "==",
                    "5.1.0"
                ]
            ]
        }
    ],
    "lcname": "async-icq"
}
        
Elapsed time: 0.11936s