qmetrics.net

LINE Bot SDK Python

Python SDK for LINE Messaging API bots

LINE Bot SDK Python screenshot

A Python package that simplifies building bots against the LINE Messaging API. Install via pip and wire webhooks with Flask, FastAPI, or aiohttp.

Overview

LINE Bot SDK for Python wraps the LINE Messaging API so teams can build chat bots in Python. It targets Python 3.10 and later and is installed with pip as line-bot-sdk.

The current linebot.v3 modules are generated from the OpenAPI spec and are the maintained path forward; older linebot 2.x modules remain usable but are not updated. The SDK includes webhook parsing and handling (WebhookParser and WebhookHandler), signature verification, and clients for sending replies and rich messages. Sample echo bots exist for Flask, FastAPI, aiohttp, and a simple WSGI server.

Models support JSON deserialization (for example Flex Message layouts from the Flex Message Simulator). HTTP helpers expose response headers such as x-line-request-id when using with-http-info call variants. Official LINE API documentation covers the underlying HTTP API; this SDK focuses on Python integration.

Developers typically run a small HTTP app that receives LINE webhook POSTs, validates the X-Line-Signature header, and dispatches events to decorated handler functions for messages, follows, and other event types.

Key features

  • WebhookParser and WebhookHandler
  • OpenAPI-generated linebot.v3 clients
  • Reply and messaging API wrappers
  • Flex Message JSON deserialization
  • HTTP response header helpers
  • Invalid signature error handling
  • Flask and FastAPI sample bots

Use cases

  • LINE chat bot backends in Python
  • Webhook callback servers
  • Echo and kitchen-sink bot prototypes
  • Rich menu and Flex Message bots

Tags

Similar software

axios

Promise-based HTTP client for browser and Node.js

Axios is a promise-based HTTP client for JavaScript environments in the browser and Node.js. It supports common request methods, configurable defaults, and interceptors for request and response handling.

★ 109.5k⟳ 2 days agoMIT

FastAPI

Python web framework for building APIs with type hints

FastAPI is a Python web framework for building APIs using standard type hints. It builds on Starlette and Pydantic and generates interactive OpenAPI documentation for the endpoints you define.

★ 105.1k⟳ 9 days agoMIT

OmniRoute

OpenAI-compatible AI gateway with provider routing

OmniRoute exposes one endpoint that routes chat requests across many LLM providers with quota-aware fallback and compression.

★ 90.7k⟳ todayMIT

Hoppscotch

Web, desktop and CLI API development ecosystem

Hoppscotch lets developers send HTTP, WebSocket, GraphQL, and related API requests from a lightweight client. Collections, environments, teams, and sync help organize testing across devices.

★ 81k⟳ 5 days agoMIT
Open Source Alternative to:Postman

NestJS

Progressive TypeScript framework for Node.js backends

Nest organizes Node server apps with modules, dependency injection, and first-party packages for auth, data, queues, and observability.

★ 77.2k⟳ todayMIT

JSON Server

Zero-code mock REST API from JSON data files

JSON Server turns a JSON or JSON5 database file into a REST API for local prototyping. It supports filtering, sorting, pagination, embedding relations, and static assets.

★ 75.7k⟳ 8 months agoMIT