Skip to main content

High-performance, anti-detection WhatsApp automation SDK. Features async SQLite storage, rate limiting, and human-like interaction loops.

Project description

🚀 Tweakio-Whatsapp Library

The Developer-First WhatsApp Automation Toolkit
Built on Playwright, Camoufox & BrowserForge for maximum reliability and undetectability.


This repository provides a powerful, modular toolkit for WhatsApp automation. Unlike standard libraries, Tweakio is designed for modern, human-like interactions, ensuring safety and longevity for your automation pipelines.

Whether you are building a smart chatbot, an automated alert system, or a workflow for your business, Tweakio gives you the granular control you need.


✨ Features

  • 🛡️ Anti-Detection First: Built on Playwright + Camoufox to mimic real browser fingerprints.
  • 🧩 Modular Architecture: Components like ChatRoller, MessageProcessor, and BrowserManager work together or standalone.
  • 🤖 Human-Like Behavior: Simulates natural typing speeds, mouse movements, and pauses.
  • ⚡ High-Performance Storage: Async Queue-based SQLite integration for blocking-free message persistence.
  • ⚖️ Intelligent Rate Limiting: Built-in protection against number bans via smart request throttling.
  • 📡 Dynamic Selectors: Smart element detection that adapts to WhatsApp Web UI changes.

📦 Installation

pip install tweakio-SDK

Note: Requires Python 3.8+

Currently we are supporting Whatsapp Web but in future we will add more support to different platforms

⚡ Quick Start

Here is a complete, working example using the latest MessageProcessor API:

import asyncio
from tweakio_whatsapp import BrowserManager, WhatsappLogin, MessageProcessor, ChatLoader


async def main():
    # 1️⃣ Initialize Browser with Anti-Detect capabilities
    browser_manager = BrowserManager(headless=False)
    page = await browser_manager.getPage()

    # 2️⃣ Perform Login (Scan QR Code if needed)
    wp_login = WhatsappLogin(page=page)
    await wp_login.login()

    # 3️⃣ Start Message Processor & Chat Loader
    # MessageProcessor handles rate limiting and async storage automatically
    processor = MessageProcessor(page=page)
    chat_loader = ChatLoader(page=page)

    print("🚀 Listening for messages...")

    # 4️⃣ Iterate through chats and process messages
    async for chat, name in chat_loader.ChatRoller(cycle=1, MaxChat=3):
        print(f"📂 Checking Chat: {name}")

        messages = await processor.MessageFetcher(chat=chat)
        for msg in messages:
            print(f"   📩 New Message: {msg.text} (Direction: {msg.Direction})")


if __name__ == "__main__":
    asyncio.run(main())

💡 Pro Tip: Check test/play.py in the repository for more advanced examples!


🛠️ Modules Overview

Module Description
BrowserManager Handles browser creation, fingerprinting, and proxy management.
WhastappLogin Manages QR scanning, session saving, and login verification.
MessageProcessor Fetches, traces, and filters messages with built-in rate limiting.
Storage Async queue-powered SQLite wrapper for efficient persistence.
ChatRoller Automates scrolling and loading old chats.

🤝 Contributing

We welcome contributions! If you have ideas for new features or bug fixes:

  1. Fork the repo 🍴
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request 🚀

📄 License

Distributed under the MIT License. See LICENSE for more information.


🛠️ Performance & Safety Note

Tweakio-SDK v0.1.2+ uses an Async SQL Writer. This means database operations never block your main automation loop, ensuring maximum responsiveness even during heavy message bursts.


Made with passion by the Tweakio Team

Project details


Download files

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

Source Distribution

tweakio_sdk-0.1.3.tar.gz (30.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tweakio_sdk-0.1.3-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

Details for the file tweakio_sdk-0.1.3.tar.gz.

File metadata

  • Download URL: tweakio_sdk-0.1.3.tar.gz
  • Upload date:
  • Size: 30.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for tweakio_sdk-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f2bf17982c738501b9f6745417b7ed82c0747aa2c24fa175a4752a2051e8ed09
MD5 414f61a5e7fe33e74919de0dd817ef05
BLAKE2b-256 9fe6a863800eea5cd98412a4cddf7a945de85571d9c3c1e8fe3faa3477439930

See more details on using hashes here.

File details

Details for the file tweakio_sdk-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: tweakio_sdk-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 33.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for tweakio_sdk-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 807e04d76131e827da8ff62358f038bb2af40be33d46e77ed0da376d03132689
MD5 6fa988c4f2cb4e39c3aa033b7bcfb908
BLAKE2b-256 feb0beb12a94ba7e318ebd4d74288f8ed2ff63f14129c6a9207ce073d3d5e37c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page