Skip to main content

Ayinope AIO Framework

Project description

A Python website bot development framework (WIP)


This project was created to aid the development of website bots and API wrappers. aio-framework handles task management and execution, session management, and captcha queue management (with threads!). Currently, captcha queue management supports 2Captcha. aio-framework is meant to decrease development time by providing common bot and API wrapper functionality.

Basic Usage

This module is available via pip:

$ pip install aio-framework

Basic ApiWrapper and Bot implementations are shown below. Bot implementations must implement the execute_task method.


from aio import ApiWrapper

class ExampleApiWrapper(ApiWrapper):
    BASE_URL = ''

    def get_product_data(self, product_url):
        response = self.get(product_url)
        return response.json()['data'] # Or something

    def add_product_to_cart(self, product_data, captcha_token):
        payload = {
            'product_data': product_data,
            'captcha': captcha_token
        endpoint = '/add-to-cart'
        response =, data=payload)
        return response.json()['success'] # Or something


from aio import Bot
from aio.captcha import CaptchaManager
from exampleapiwrapper import ExampleApiWrapper

class ExampleBot(Bot):
    def execute_task(self, task):
        example_api_wrapper = ExampleApiWrapper()

        twocaptcha_api_token = '2CAPTCHA_API_TOKEN_HERE'
        site_key = 'SITE_KEY_HERE'
        page_url = 'PAGE_URL_HERE'

        captcha_manager = CaptchaManager(twocaptcha_api_token, site_key, page_url)

        task.status = 'STARTED'

        product_url =['product_url']'Getting product data')
        product_data = example_api_wrapper.get_product_data(product_url)'Got product data!')'Waiting for captcha token')
        captcha_token = captcha_manager.wait_for_captcha_token()'Got captcha token!')'Adding product to cart')
        added = example_api_wrapper.add_product_to_cart(product_data, captcha_token)'Added product to cart!')

        task.status = 'FINISHED'


from aio import Task
from examplebot import ExampleBot

example_bot = ExampleBot()
task_data = {
    'product_url': ''
task = Task(task_data)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
aio-framework- (5.1 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page