How jayeeed/fb-gapi works
Project type and purpose
• This is a Python Async SDK (library) for interacting with Meta’s Facebook Graph and Messenger Send APIs.
• It provides an asynchronous client to send text and image messages, fetch conversation history, and handle API errors.
File structure
• .github/workflows/pypi-publish.yml → CI pipeline that builds, tests, and publishes the package to PyPI.
• README.md → high-level overview, usage examples, feature list.
• pyproject.toml → metadata, dependencies, and build configuration.
• fb_gapi/
• __init__.py → package export (e.g., MessengerClient)
• client.py → core asynchronous HTTP client and public methods (asend_text, asend_remote_attachment, etc.)
• exceptions.py → custom exception class (MessengerAPIError)
• utils.py → helper functions (e.g., payload builders, file readers)
README for additional insights
• The README explicitly describes the main use-cases (send text, remote/local attachments, get chat history).
• It shows async usage patterns, error handling, and prerequisites (Python 3.9+).
Final checklist for detail
• Async boundaries (e.g., annotate “async call”).
• Error-handling flow separately.
• Packaging/publishing path.