Giter VIP home page Giter VIP logo

songmam's Introduction

babel

Songmam

a facebook messenger hypermodern python library based on fastapi.

Build status Python Version Dependencies Status

Code style: black Security: bandit Pre-commit Semantic Versions License

Features

Installation

pip install songmam

Documentation

WIP

Usage/Examples

There are a few examples under the folder, examples

from fastapi import FastAPI

from songmam import WebhookHandler, MessengerApi
from songmam.models.webhook import MessagesEvent

app = FastAPI(
    title="echo"
)


handler = WebhookHandler(
    app=app, path="/webhook", app_secret=FACEBOOK_APP_SECRET, verify_token=FACEBOOK_PAGE_VERIFY_TOKEN
)

api = MessengerApi(access_token=FACEBOOK_PAGE_ACCESS_TOKEN)


@handler.add(MessagesEvent)
async def handle_message(event: MessagesEvent, *args, **kwargs):
    """
    echo back message
    """
    await api.send(event.theMessaging.sender, event.theMessaging.message.text)

Used By

This project is used by the following companies:

Authors

Feedback

If you have any feedback, you can create an issue or PR.

๐Ÿ›ก License

License

This project is licensed under the terms of the MIT license. See LICENSE for more details.

Credits

This project was generated with python-package-template.

songmam's People

Contributors

wasdee avatar dependabot[bot] avatar thunpisit avatar pre-commit-ci[bot] avatar

Stargazers

Yothin M avatar Roman Tezikov avatar  avatar  avatar Arthit Suriyawongkul avatar  avatar Marcelo Trylesinski avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.