{"id":13469332,"url":"https://github.com/danielcardeenas/whatsapp-framework","last_synced_at":"2025-05-16T11:03:46.484Z","repository":{"id":22435840,"uuid":"74162540","full_name":"danielcardeenas/whatsapp-framework","owner":"danielcardeenas","description":"⚗️Whatsapp python api","archived":false,"fork":false,"pushed_at":"2020-04-10T20:42:42.000Z","size":26334,"stargazers_count":1177,"open_issues_count":147,"forks_count":358,"subscribers_count":119,"default_branch":"master","last_synced_at":"2025-04-09T06:06:05.256Z","etag":null,"topics":["api","bot","framework","python","whatsapp","whatsapp-api","whatsapp-bot","whatsapp-framework"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielcardeenas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-18T20:04:41.000Z","updated_at":"2025-03-31T17:09:11.000Z","dependencies_parsed_at":"2022-08-07T10:15:41.176Z","dependency_job_id":null,"html_url":"https://github.com/danielcardeenas/whatsapp-framework","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielcardeenas%2Fwhatsapp-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielcardeenas%2Fwhatsapp-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielcardeenas%2Fwhatsapp-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielcardeenas%2Fwhatsapp-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielcardeenas","download_url":"https://codeload.github.com/danielcardeenas/whatsapp-framework/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254518383,"owners_count":22084374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","bot","framework","python","whatsapp","whatsapp-api","whatsapp-bot","whatsapp-framework"],"created_at":"2024-07-31T15:01:34.143Z","updated_at":"2025-05-16T11:03:46.456Z","avatar_url":"https://github.com/danielcardeenas.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Warning\n\u003e Whatsapp blocks numbers now. Framework wont work properly until next version\n\u003e \n\u003e Meanwhile heres a better alternative: [**project sulla**](https://github.com/danielcardeenas/sulla)\n\n# mac (Whatsapp framework) \n![Version](https://img.shields.io/badge/version-1.1.0-brightgreen.svg?style=flat-square)\n![Version](https://img.shields.io/badge/release-beta-green.svg?style=flat-square)\n\nMac is a whatsapp bot/framework I made as a weekend project. The project itself has all you need to make your own custom bot easily.\n\nMac has built-in human behavior so you only have to worry about the functions you make. Every module works completely separated from the core, this means that you can erease every module and mac will keep working\n\n_This needs **Python 3.5**_\n\n# Setup:\n1. Clone this repository (with submodules since it uses tgalal's yowsup library)\n```sh\n\u003e git clone https://github.com/danielcardeenas/whatsapp-framework.git\n```\n2. Run setup.sh (Most likely on sudo since its going to install some libraries)\n```sh\n\u003e sudo ./setup.sh\n```\n\n3. Register your phone and get a password with like this:\n```sh\n# Replace CC with your country code (See https://countrycode.org)\n\u003e yowsup-cli registration --requestcode sms --phone CCXXXXXXXX --cc CC -E android\n# After getting the sms code (in this example: 123456)\n\u003e yowsup-cli registration --register 123456 --phone CCXXXXXXXX --cc CC -E android\n```\n\n\n4. Open **config.py** and add set your credentials\n\n5. Ready to go! (Now you can add your own whatsapp modules)\n```sh\n\u003e ./start.sh\n```\n\n# Quickstart\nCreate your own module inside [`modules/`](https://github.com/danielcardeenas/whatsapp-framework/tree/master/modules) directory\n```python\n# modules/hi_module.py\n\nfrom app.mac import mac, signals\n\n@signals.message_received.connect\ndef handle(message):\n    if message.text == \"hi\":\n        mac.send_message(\"Hello\", message.conversation)\n        \n        # Can also send media\n        #mac.send_image(\"path/to/image.png\", message.conversation)\n        #mac.send_video(\"path/to/video.mp4\", message.conversation)\n```\nNow you should only add it into [`modules/__init__.py`](https://github.com/danielcardeenas/whatsapp-framework/blob/master/modules/__init__.py) to enable the module\n```python\n# modules/__init__.py\n...\nfrom modules import hi_module\n...\n```\nAnd that's it! You are ready to go.\n\n###### If your module needs libraries from pip you should add them into a `requirements.txt` and run `sudo ./setup.sh` to download the dependencies\n\n###### _You can take [`hihelp module`](https://github.com/danielcardeenas/whatsapp-framework/blob/master/modules/hihelp/hihelp.py) as an example._\n\n\n# Updates\nThe project is not submoduling yowsup now due to a lot of the modifications made are focused for this project only and to make things simpler.\n- [x] Notification on messages receipt (received and blue check marks)\n- [x] Get contacts statuses\n- [x] Get contacts profile picture (also from groups)\n- [x] Set profile picture (also from groups)\n- [x] Send videos (needs ffmpeg installed)\n- [x] Add support for @tag messages\n- [x] Add support for reply messages\n- [x] Add support for receiving images\n- [x] Add support for big receiving big files (downloading and decryption done in chunks)\n- [x] Add support for sending images\n- [ ] Add support for encrypting images in chunks (_TODO_)\n- [ ] Add pickle support to remember the messages when mac its turned off(_TODO_)\n\n# Example screenshots:\n![](https://i.imgur.com/ZRlk5Uj.png)\n![](https://i.imgur.com/JmPbPXB.png)\n![](https://i.imgur.com/L4ebZql.png)\n\u003cimg src=\"https://i.imgur.com/pLiwAm5.png\" width=\"253px\" height=\"450px\"\u003e\n\u003cimg src=\"https://i.imgur.com/poLpmAR.png\" width=\"253px\" height=\"450px\"\u003e\n\u003cimg src=\"https://i.imgur.com/CRNKfHj.png\" width=\"253px\" height=\"450px\"\u003e\n\n# Wiki\n[Read this](https://github.com/danielcardeenas/whatsapp-framework/wiki/Do-not-get-banned)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielcardeenas%2Fwhatsapp-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielcardeenas%2Fwhatsapp-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielcardeenas%2Fwhatsapp-framework/lists"}