Metadata-Version: 2.1
Name: massbots
Version: 0.3.0
Summary: SDK for api.massbots.xyz
Home-page: https://github.com/massbots/sdk
Author: massbots-dev
Author-email: sy.tgbot@gmail.com
Requires-Python: >=3.10
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: pydantic (>=2)
Requires-Dist: python-dateutil (>=2.8.2)
Requires-Dist: typing-extensions (>=4.7.1)
Requires-Dist: urllib3 (>=1.25.3)
Project-URL: Repository, https://github.com/massbots/sdk
Description-Content-Type: text/markdown

# Python SDK

> `$ pip install massbots`

## aiogram + massbots

```python
import os
import massbots
from aiogram import Bot, Dispatcher
from aiogram import types, executor


mb = massbots.Api(os.environ["MB_TOKEN"])
bot = Bot(token=os.environ["BOT_TOKEN"])
dp = Dispatcher(bot)


@dp.message_handler()
async def on_text(msg: types.Message):
    video_id = # extract id from msg.text
    file_id = mb.dl.video_cached(video_id, "720p")
    bot.send_video(msg.chat.id, file_id)


if __name__ == "__main__":
    executor.start_polling(dp)
```

