Package: ampalibe
AmpalibeVideo Tutorials·Documentation·Report BugAmpalibeis a lightweight Python framework for building Facebook Messenger bots faster.
It provides a new concept, it manages webhooks, processes data sent by Facebook and providesAPI Messengerwith advanced functions such as payload management, item length, and more.Show your supportby giving a star 🌟 if this project helped you!InstallationpipinstallampalibeOR you can install dev versionpipinstallhttps://github.com/iTeam-S/Ampalibe/archive/refs/heads/main.zipif you use mysql as database, you have to installmysql-connectorormysql-connector-pythonwith ampalibepipinstallampalibe[mysql-connector]if you use postgresql as database, you have to installpsycopg2with ampalibepipinstallampalibe[psycopg2]if you use mongodb as database, you have to installpymongowith ampalibepipinstallampalibe[pymongo]Usagecommand-lineampalibeisampalibe.batforWindowsampalibecreatemyprojectOR$cdmyproject
$ampalibeinitto run project, just useampaliberunfor dev mode withHot Reloadampaliberun--devRegister for an Access TokenYou 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 usingAmpalibe.This app setup guideshould helpORSeethis videoon YoutubeMinimal ApplicationimportampalibefromampalibeimportMessenger,Modelfromampalibe.messengerimportActionchat=Messenger()query=Model()@ampalibe.before_receive()defbefore_process(sender_id,**ext):#  Put a view for each message receivedchat.send_action(sender_id,Action.mark_seen)returnTrue@ampalibe.command('/')defmain(sender_id,cmd,**ext):"""No need to manage weebhooks and data: messages are received directly in a main function"""chat.send_text(sender_id,'Enter your name')# define the function of the next treatmentquery.set_action(sender_id,'/get_name')@ampalibe.action('/get_name')defget_name(sender_id,cmd,**ext):query.set_action(sender_id,None)#  clear current actionchat.send_text(sender_id,f'Hello{cmd}')#  greeting with name enter by userDocumentationAmpalibe ReadthedocsOther resource[Youtube] Create a Facebook Bot Messenger with AMPALIBE Framework (EN)[Youtube] Tutoriel Framework Ampalibe (FR)[Youtube] Ampalibe Framework Episode (Teny Vary Masaka)DeploymentUsing containerGo to our dir project and run$dockerrun-d-v"${PWD}:/usr/src/app"-p4555:4555ghcr.io/iteam-s/ampalibeUsing heroku containerGo to heroku docs fordocker deploysChange your Dockerfile like thisFROMghcr.io/iteam-s/ampalibeADD./usr/src/app/# RUN pip install --no-cache-dir -r requirements.txtCMDampalibe-p$PORTrunCustomize your Dockerfile if necessaryUsing heroku pythonGo to heroku docs forGetting Started on Heroku with PythonDefine your Procfile like thisweb: ampalibe -p $PORT runOther plateform ?Maybe just runampalibe runin the right directory? or specify port if neededampalibe -p 1774 runAboutAmpalibe is a word of Malagasyorigin designating the fruit jackfruit.We have made a promise tokeep itlightmake iteasy to usedo itquickly to developContributorsCommunity📌 ExtensionAmpalibe extensionbyRaja RakotonirinaA VScode extension that allows the user to write a snippet of code using easy to remember prefixes📌 ModuleAmpalibe Odoo AddonsbyRivo LalainaAn Odoo module to synchronize the Ampalibe Framework with Odoo ERP.