{"id":21659425,"url":"https://github.com/iTeam-S/Ampalibe","last_synced_at":"2025-07-17T22:32:10.169Z","repository":{"id":42041196,"uuid":"451968663","full_name":"iTeam-S/Ampalibe","owner":"iTeam-S","description":"Ampalibe is a lightweight Python framework for building Facebook Messenger bots faster. It provides a new concept, it manages webhooks, processes data sent by Facebook and provides API Messenger with advanced functions such as payload management, item length, and more.","archived":false,"fork":false,"pushed_at":"2024-01-11T06:59:26.000Z","size":6134,"stargazers_count":94,"open_issues_count":1,"forks_count":11,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-05-17T00:39:50.273Z","etag":null,"topics":["ampalibe","ampalibe-framework","bot","chatbot-framework","facebook-messenger","facebook-messenger-bot","framework","hacktoberfest","hacktoberfest2023","messenger-api","messenger-platform","python"],"latest_commit_sha":null,"homepage":"https://ampalibe.readthedocs.io/","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/iTeam-S.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-01-25T17:08:03.000Z","updated_at":"2024-04-01T20:57:10.000Z","dependencies_parsed_at":"2023-11-07T17:10:21.653Z","dependency_job_id":"70d678f1-feb9-4b6f-bfbb-0318e9c9c57b","html_url":"https://github.com/iTeam-S/Ampalibe","commit_stats":{"total_commits":326,"total_committers":7,"mean_commits":46.57142857142857,"dds":0.1165644171779141,"last_synced_commit":"d860aa4da23639c8aadf7435d93e49d85e31cd08"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iTeam-S%2FAmpalibe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iTeam-S%2FAmpalibe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iTeam-S%2FAmpalibe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iTeam-S%2FAmpalibe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iTeam-S","download_url":"https://codeload.github.com/iTeam-S/Ampalibe/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226200502,"owners_count":17589312,"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":["ampalibe","ampalibe-framework","bot","chatbot-framework","facebook-messenger","facebook-messenger-bot","framework","hacktoberfest","hacktoberfest2023","messenger-api","messenger-platform","python"],"created_at":"2024-11-25T09:31:02.420Z","updated_at":"2024-11-25T09:32:29.142Z","avatar_url":"https://github.com/iTeam-S.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Ampalibe\n\u003cp align=\"center\"\u003e \u003cimg height=\"300\" src=\"https://github.com/iTeam-S/Ampalibe/raw/main/docs/source/_static/ampalibe_logo.png\"/\u003e\u003c/p\u003e\n\u003cdiv align=\"center\"\u003e\n \u003ch4\u003e\n    \u003ca href=\"https://github.com/iTeam-S/Ampalibe#other-resource\"\u003eVideo Tutorials\u003c/a\u003e\n  \u003cspan\u003e · \u003c/span\u003e\n    \u003ca href=\"https://ampalibe.readthedocs.io\"\u003eDocumentation\u003c/a\u003e\n  \u003cspan\u003e · \u003c/span\u003e\n    \u003ca href=\"https://github.com/iTeam-S/Ampalibe/issues/\"\u003eReport Bug\u003c/a\u003e\n \u003c/h4\u003e\n\n\u003cp\u003e\n \u003cb\u003eAmpalibe\u003c/b\u003e is a lightweight Python framework for building Facebook Messenger bots faster.\nIt provides a new concept, it manages webhooks, processes data sent by Facebook and provides \u003ca href=\"https://developers.facebook.com/docs/messenger-platform/\"\u003eAPI Messenger\u003c/a\u003e with advanced functions such as payload management, item length, and more.\n\u003c/p\u003e\n\n\u003ca href='https://github.com/iTeam-S/Ampalibe/#'\u003e\u003cimg src='https://img.shields.io/badge/version-2.0.0.dev-%23008080'/\u003e\u003c/a\u003e\n\u003ca href='https://ampalibe.readthedocs.io/en/latest/'\u003e\u003cimg src='https://readthedocs.org/projects/ampalibe/badge/?version=latest\u0026style=flat'/\u003e\u003c/a\u003e\n\u003ca href='https://github.com/iTeam-S/Ampalibe/actions/workflows/ci.yml'\u003e\u003cimg src='https://github.com/iTeam-S/Ampalibe/actions/workflows/ci.yml/badge.svg'/\u003e\u003c/a\u003e\n\u003ca href='https://github.com/iTeam-S/Ampalibe/actions/workflows/cd-pg.yml'\u003e\u003cimg src='https://github.com/iTeam-S/Ampalibe/actions/workflows/cd-pg.yml/badge.svg'/\u003e\u003c/a\u003e\n\u003ca href='https://github.com/iTeam-S/Ampalibe/actions/workflows/cd-pypi.yml'\u003e\u003cimg src='https://github.com/iTeam-S/Ampalibe/actions/workflows/cd-pypi.yml/badge.svg'/\u003e\u003c/a\u003e\n\n\n\n\u003cp\u003e\n \u003ca href='https://pypi.org/project/ampalibe/'\u003e \u003cimg src='https://img.shields.io/pypi/v/ampalibe?style=for-the-badge'/\u003e\u003c/a\u003e\n \u003ca href='https://pypi.org/project/ampalibe/'\u003e \u003cimg src='https://img.shields.io/pypi/pyversions/ampalibe?style=for-the-badge'/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp\u003e\n   \u003cstrong\u003e Show your support\u003c/strong\u003e  \u003cem\u003e by giving a star 🌟 if this project helped you! \u003c/em\u003e\n \u003c/p\u003e\n\u003c/div\u003e\n\n\n## Installation\n\n```s\npip install ampalibe\n```\n\nOR you can install dev version\n\n\n```s\npip install https://github.com/iTeam-S/Ampalibe/archive/refs/heads/main.zip\n```\n\n------------------\n\nif you use mysql as database, you have to install `mysql-connector` or `mysql-connector-python` with ampalibe\n\n```s\npip install ampalibe[mysql-connector]\n```\n\n----------------------\n\nif you use postgresql as database, you have to install `psycopg2` with ampalibe\n\n```s\npip install ampalibe[psycopg2]\n```\n\n----------------------\n\nif you use mongodb as database, you have to install `pymongo` with ampalibe\n\n```s\npip install ampalibe[pymongo]\n```\n\n## Usage\n\n\u003e command-line __ampalibe__ is __ampalibe.bat__ for _Windows_\n\n```s\nampalibe create myproject\n```\n\nOR \n\n\n```shell\n$ cd myproject\n$ ampalibe init\n```\n\nto run project, just use\n```s\nampalibe run\n```\n\nfor dev mode with __Hot Reload__\n```s\nampalibe run --dev\n```\n\n### Register for an Access Token\n\nYou will need to configure a Facebook application, a Facebook page, get the access to the page, link the application to the page, configure a webhook for your app before you can really start using __Ampalibe__.\n\n[This app setup guide](https://developers.facebook.com/docs/messenger-platform/getting-started/app-setup) should help\n\nOR \n\nSee [this video](https://www.youtube.com/watch?v=Sg2P9uFJEF4\u0026list=PL0zWFyU4-Sk5FcKJpBTp0-_nDm0kIQ5sY\u0026index=1) on Youtube\n\n### Minimal Application\n\n```python\nimport ampalibe\nfrom ampalibe import Messenger, Model\nfrom ampalibe.messenger import Action\n\nchat = Messenger()\nquery = Model()\n\n@ampalibe.before_receive()\ndef before_process(sender_id, **ext):\n    #  Mark as seen for each message received\n    chat.send_action(sender_id, Action.mark_seen)\n    return True\n\n@ampalibe.command('/')\ndef main(sender_id, cmd, **ext):\n    \"\"\"\n    No need to manage weebhooks and data: messages are received directly in a main function\n    \"\"\"\n    chat.send_text(sender_id, 'Enter your name')\n    \n    # define the function of the next treatment\n    query.set_action(sender_id, '/get_name')\n    \n@ampalibe.action('/get_name')\ndef get_name(sender_id, cmd, **ext):\n    query.set_action(sender_id, None)  #  clear current action\n    chat.send_text(sender_id, f'Hello {cmd}')  #  greeting with name enter by user\n```\n\n## Documentation\n\n- [Ampalibe Readthedocs](https://ampalibe.readthedocs.io/)\n\n#### Other resource\n\n- [ [Youtube] Create a Facebook Bot Messenger with AMPALIBE Framework (EN) ](https://www.youtube.com/playlist?list=PL0zWFyU4-Sk5FcKJpBTp0-_nDm0kIQ5sY)\n- [ [Youtube] Tutoriel Framework Ampalibe (FR)](https://www.youtube.com/playlist?list=PLz95IHSyn29U4PA1bAUw3VT0VFFbq1LuP)\n- [ [Youtube] Ampalibe Framework Episode (Teny Vary Masaka) ](https://www.youtube.com/playlist?list=PLN1d8qaIQgmKmCwy3SMfndiivbgwXJZvi)\n\n\n## Deployment \n\n**Using container**\n\n\u003e Go to our dir project and run \n\n```s\n$ docker run -d -v \"${PWD}:/usr/src/app\" -p 4555:4555 ghcr.io/iteam-s/ampalibe\n```\n\n**Using heroku container**\n\n- Go to heroku docs for [docker deploys](https://devcenter.heroku.com/articles/container-registry-and-runtime) \n\n- Change your Dockerfile like this\n\n```dockerfile\nFROM ghcr.io/iteam-s/ampalibe\n\nADD . /usr/src/app/\n\n# RUN pip install --no-cache-dir -r requirements.txt\n\nCMD ampalibe -p $PORT run\n```\n- Customize your Dockerfile if necessary\n\n\n**Using heroku python**\n\n - Go to heroku docs for [Getting Started on Heroku with Python](https://devcenter.heroku.com/articles/getting-started-with-python?singlepage=true)\n\n\n - Define your Procfile like this `web: ampalibe -p $PORT run`\n \n \n **Other plateform ?**\n \n Maybe just run `ampalibe run` in the right directory? or specify port if needed `ampalibe -p 1774 run`\n\n## About \n\nAmpalibe is a word of Malagasy  \u003cimg src=\"https://github.com/RajaRakoto/github-docs/blob/master/dago.gif?raw=true\" width=15\u003e  origin designating the fruit jackfruit.\n\nWe have made a promise to\n \n- keep it **light**\n- make it **easy to use**\n- do it **quickly to develop**\n\n\n## Contributors\n\n![Image des contributeurs GitHub](https://contrib.rocks/image?repo=iTeam-S/Ampalibe)\n\n## Community \n\n### 📌 Extension\n\n- [Ampalibe extension](https://marketplace.visualstudio.com/items?itemName=iTeam-S.ampalibe)  by [Raja Rakotonirina](https://github.com/RajaRakoto)\n\n       A VScode extension that allows the user to write a snippet of code using easy to remember prefixes\n       \n       \n### 📌 Module\n\n- [Ampalibe Odoo Addons](https://apps.odoo.com/apps/modules/15.0/ampalibe/)  by [Rivo Lalaina](https://github.com/rivo2302)\n\n       An Odoo module to synchronize the Ampalibe Framework with Odoo ERP.\n\n### 📌 Star History\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=iteam-s/ampalibe\u0026type=Date\u0026theme=dark\" /\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=iteam-s/ampalibe\u0026type=Date\" /\u003e\n  \u003cimg alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=iteam-s/ampalibe\u0026type=Date\" /\u003e\n\u003c/picture\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FiTeam-S%2FAmpalibe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FiTeam-S%2FAmpalibe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FiTeam-S%2FAmpalibe/lists"}