The AioBer library AsyncIO viBER (Aiober) is a python library for creating Viber bots easily, professionally and in a structured way!
Project description
Аiober
AsyncIO viBER – Python library for easy creation of Viber bots Currently, Viber bots can only be works using webhooks.
Introduction
...
Let's get started !
Installing
Creating a viber bot is easy !
- Install the library with
pip install aiober - From aiober import Bot and Dispatcher to your projects
- Build a simple script like in Example
- Make viber bot here
- Using ngrok make your address global (for webhooks)
- Run your script
- Open Postman and make post request to https://chatapi.viber.com/pa/set_webhook with data
{"url":"https://your-domain/update, "auth_token": "auth-token"}for set webhook to viber bot Good, webhook is registred !
Example
Simple echo bot
import asyncio
from aiober import Bot, Dispatcher
from aiober.types import Message
bot = Bot('auth-token')
dp = Dispatcher(bot=bot)
# router
@dp.messages()
async def echo(message: Message):
await message.copy_to(message.sender.id)
async def main():
# start webhook
await dp.start_webhook(
host='127.0.0.1',
port=8000,
path='/update'
)
asyncio.run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aiober-0.0.2.tar.gz
(15.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
aiober-0.0.2-py3-none-any.whl
(23.0 kB
view details)
File details
Details for the file aiober-0.0.2.tar.gz.
File metadata
- Download URL: aiober-0.0.2.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0476673d99e14b96310fe50d235160313a31e9d8923466b5f16702687dc169e6
|
|
| MD5 |
abb6cc5ad3c71ae8712582a84faf8902
|
|
| BLAKE2b-256 |
69bb144147372d07654ab706ab93a13a6dc3b62975af1dd957fae207ba91060f
|
File details
Details for the file aiober-0.0.2-py3-none-any.whl.
File metadata
- Download URL: aiober-0.0.2-py3-none-any.whl
- Upload date:
- Size: 23.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8c2aa88a3b5164ecde220e84eb63af07221e2d7cb0bbcc72af16a3d2739ac12
|
|
| MD5 |
1b2bcac6a9690c7545ce375226b4d40c
|
|
| BLAKE2b-256 |
a5da66d267fac5f3cba0e75fede62677cec73cd94217c8ee8b642a08c8fbb284
|