Skip to main content

A Python library for Facebook Messenger API

Project description

pymes

A simple, lightweight Python wrapper for the Facebook Messenger API.

Installation

No installation command is available yet as this package is not yet published to PyPI. Once published, you will be able to install it via pip:

pip install py-mes

Usage

Basic Example

from pymes import MessengerClient, Text, Attachment

# Initialize the client
sender = MessengerClient(page_access_token="YOUR_PAGE_ACCESS_TOKEN")

# Send a text message
sender.send(recipient_id="USER_ID", message=Text("Hello, world!"))

# Send an attachment (Image)
sender.send("USER_ID", Attachment("image", "https://example.com/image.jpg"))

# Mark as seen
sender.send("USER_ID", action="mark_seen")

Supported Message Types

  • Text: Simple text messages.
  • Attachment: Images, files, audio, video.
  • QuickReply: Messages with quick reply buttons.
  • GenericTemplate: Carousel-like templates with images and buttons.

Requirements

  • Python 3.7+
  • requests library

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymes_api-0.1.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymes_api-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file pymes_api-0.1.0.tar.gz.

File metadata

  • Download URL: pymes_api-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pymes_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1f4f536e3dd55f6f780483638c8264d7595724a781aa662e4b95d158db20286c
MD5 54ce9ef277aa6ace97c034288170a0e7
BLAKE2b-256 8f06c877fa66332b67f5cd6396b5c4f539e953638d3cbd3daa6f40e30575590e

See more details on using hashes here.

File details

Details for the file pymes_api-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pymes_api-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pymes_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71592209181fdffc819d8b972d21e64c106474b2eecae5138fc38686057ed143
MD5 26d43cd97f32650efcc967c3a203a438
BLAKE2b-256 7057066832af341d5dedec0cdb39c79e62009d293ed11ae1c328b986c89d0562

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page