{"id":15943883,"url":"https://github.com/leandcesar/wa_me","last_synced_at":"2025-12-13T22:34:23.934Z","repository":{"id":65095788,"uuid":"580176771","full_name":"leandcesar/wa_me","owner":"leandcesar","description":"A modern, easy to use, feature-rich ready API wrapper for WhatsApp Business Cloud written in Python","archived":false,"fork":false,"pushed_at":"2023-05-23T05:23:37.000Z","size":1626,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-29T08:11:14.652Z","etag":null,"topics":["bot","python","whatsapp","whatsapp-api"],"latest_commit_sha":null,"homepage":"https://leandcesar.github.io/wa_me/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leandcesar.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-19T22:50:01.000Z","updated_at":"2023-09-20T20:39:12.000Z","dependencies_parsed_at":"2023-02-15T18:01:23.678Z","dependency_job_id":null,"html_url":"https://github.com/leandcesar/wa_me","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leandcesar%2Fwa_me","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leandcesar%2Fwa_me/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leandcesar%2Fwa_me/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leandcesar%2Fwa_me/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leandcesar","download_url":"https://codeload.github.com/leandcesar/wa_me/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237068384,"owners_count":19250057,"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":["bot","python","whatsapp","whatsapp-api"],"created_at":"2024-10-07T08:05:19.298Z","updated_at":"2025-10-19T04:31:07.310Z","avatar_url":"https://github.com/leandcesar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"==================\nWhatsApp Messenger\n==================\n\n.. raw:: html\n\n   \u003ch1 align=\"center\"\u003e\n     \u003ca href=\"https://leandcesar.github.io/wa_me\"\u003e\n       \u003cimg src=\"https://github.com/leandcesar/wa_me/blob/main/docs/logo.png?raw=true\"  width=\"200px\" alt=\"wa_me Logo\"/\u003e\n     \u003c/a\u003e\n   \u003c/h1\u003e\n\nA modern, easy to use, feature-rich ready API wrapper for `WhatsApp Business Cloud`_ written in Python.\n\n\n* Documentation: https://leandcesar.github.io/wa_me/\n* GitHub: https://github.com/leandcesar/wa_me/\n* PyPI: https://pypi.org/project/wa_me/\n* Free and open source software: MIT license\n\n\nFeatures\n--------\n\n* Full `Send Messages`_ Support:\n\n  * text\n  * media (audio, documents, images, sticker, and videos)\n  * contacts\n  * interactive (buttons, list, and products)\n  * location\n  * templates\n\n* Full `Webhook Notification`_ Parsing Support\n\nInstalling\n----------\n\nStable release\n~~~~~~~~~~~~~~\n\nTo install wa_me, run this command in your terminal:\n\n.. code-block:: console\n\n    $ pip install wa_me\n\nThis is the preferred method to install wa_me, as it will always install the most recent stable release.\n\nIf you don't have `pip`_ installed, this `Python installation guide`_ can guide\nyou through the process.\n\nFrom sources\n~~~~~~~~~~~~\n\nThe sources for wa_me can be downloaded from the `Github repo`_.\n\nYou can either clone the public repository:\n\n.. code-block:: console\n\n    $ git clone git://github.com/leandcesar/wa_me\n\nOr download the `tarball`_:\n\n.. code-block:: console\n\n    $ curl -OJL https://github.com/leandcesar/wa_me/tarball/main\n\nOnce you have a copy of the source, you can install it with:\n\n.. code-block:: console\n\n    $ python setup.py install\n\nQuick Example\n-------------\n\nMirror Bot\n~~~~~~~~~~\n\n.. code:: py\n\n    from wa_me import Bot, Ctx\n\n    class MirrorBot(Bot):\n        def before_event_message(self, ctx: Ctx):\n            ctx.read()\n\n        def on_event_message_audio(self, ctx: Ctx):\n            ctx.send_audio(ctx.message.audio.id)\n\n        def on_event_message_document(self, ctx: Ctx):\n            ctx.send_document(\n                ctx.message.document.id,\n                caption=ctx.message.document.caption,\n            )\n\n        def on_event_message_image(self, ctx: Ctx):\n            ctx.send_image(\n                ctx.message.image.id,\n                caption=ctx.message.image.caption,\n            )\n\n        def on_event_message_location(self, ctx: Ctx):\n            ctx.send_location(\n                latitude=ctx.message.location.latitude,\n                longitude=ctx.message.location.longitude,\n                address=ctx.message.location.address,\n                name=ctx.message.location.name,\n            )\n\n        def on_event_message_sticker(self, ctx: Ctx):\n            ctx.send_sticker(ctx.message.sticker.id)\n\n        def on_event_message_text(self, ctx: Ctx):\n            ctx.send_text(ctx.message.text.body)\n\n        def on_event_message_video(self, ctx: Ctx):\n            ctx.send_video(\n                ctx.message.video.id,\n                caption=ctx.message.video.caption,\n            )\n\nRun using Flask\n~~~~~~~~~~~~~~~\n\n.. code:: py\n\n    from flask import Flask, request\n    from wa_me import Bot\n\n    app = Flask(__name__)\n    bot = Bot()\n    bot.start(phone_id=\"PHONE_ID\", token=\"ACCESS_TOKEN\")\n\n    @app.get(\"/\")\n    async def ping():\n        if request.args.get(\"hub.verify_token\") == \"VERIFY_TOKEN\":\n            return request.args.get(\"hub.challenge\")\n        return \"Invalid verify token\"\n\n    @app.post(\"/\")\n    def root():\n        data = request.get_json()\n        bot.handle(data)\n        return \"Success\"\n\nRun using Fast API\n~~~~~~~~~~~~~~~~~~\n\n.. code:: py\n\n    from fastapi import FastAPI, Request\n    from wa_me import Bot\n\n    app = FastAPI()\n    bot = Bot()\n    bot.start(phone_id=\"PHONE_ID\", token=\"ACCESS_TOKEN\")\n\n    @app.get(\"/\")\n    async def ping(\n        token: str = Query(alias=\"hub.verify_token\"),\n        challenge: str = Query(alias=\"hub.challenge\"),\n    ):\n        if token == VERIFY_TOKEN:\n            return challenge\n        return \"Invalid verify token\"\n\n    @app.post(\"/\")\n    async def root(request: Request):\n        data = await request.json()\n        bot.handle(data)\n        return \"Success\"\n\nUseful Links\n------------\n\n* `Get Started with the WhatsApp Business Cloud API`_\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n\n.. _`WhatsApp Business Cloud`: https://developers.facebook.com/docs/whatsapp/cloud-api\n.. _`Send Messages`: https://developers.facebook.com/docs/whatsapp/cloud-api/reference/messages\n.. _`Webhook Notification`: https://developers.facebook.com/docs/whatsapp/cloud-api/webhooks/components\n.. _`pip`: https://pip.pypa.io\n.. _`Python installation guide`: http://docs.python-guide.org/en/latest/starting/installation/\n.. _`Github repo`: https://github.com/leandcesar/wa_me\n.. _`tarball`: https://github.com/leandcesar/wa_me/tarball/main\n.. _`Get Started with the WhatsApp Business Cloud API`: https://developers.facebook.com/docs/whatsapp/cloud-api/get-started\n.. _`Cookiecutter`: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleandcesar%2Fwa_me","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleandcesar%2Fwa_me","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleandcesar%2Fwa_me/lists"}