skillfed

line-bot-sdk

LINE Messaging API SDK for Python

line-bot-sdk v3.25.0 11.3M downloads/30d#1,399 on PyPI2,129
Permissive license Apache License 2.0 Active released

What it is and what it does

line-bot-sdk is the official Python client library for LINE's Messaging API, designed to simplify bot development on the LINE platform. It provides webhook parsing and event handling, message sending, and access to LINE's messaging features. The SDK abstracts away HTTP details and signature verification, letting developers focus on bot logic.

The package is built on requests, urllib3, aiohttp, pydantic, and other dependencies, supporting both synchronous and asynchronous workflows. It is actively maintained and supports Python 3.10 through 3.14. Developers typically use it to receive webhook events from LINE, parse them into typed event objects, and reply with formatted messages via the MessagingApi client.

Use it for:

  • Build a LINE chatbot that echoes or processes user messages in real time.
  • Create a customer support bot that routes inquiries to different handlers based on message type.
  • Send rich, templated messages to LINE users from a backend service.
  • Parse and respond to LINE follow/unfollow and postback events for interactive bot flows.
  • Integrate LINE messaging into a web application with webhook callbacks.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

SDK for building LINE bots that handles webhook parsing, event routing, and message sending through LINE's Messaging API.

Yes. The SDK is production-stable (Apache 2.0, active maintenance, no known vulnerabilities), has low install friction, and is the canonical way to build LINE bots in Python. Install it if you are building any LINE bot or integrating LINE messaging into a Python application.

Install

line-bot-sdk on PyPI

pip

pip install line-bot-sdk

uv

uv add line-bot-sdk

poetry

poetry add line-bot-sdk

Installing line-bot-sdk

Before you install

Low install friction with a pure-Python wheel distribution. Actively maintained with recent releases (last commit 2026-08-14, 2129 stars). Supports Python 3.10–3.14 with 8 runtime dependencies including requests, urllib3, aiohttp, and pydantic.

License in practice

Apache License 2.0 (permissive) allows commercial and private use, modification, and distribution with minimal restrictions—suitable for production bot projects.

Quickstart

pip install line-bot-sdk

from line_bot_sdk.v3 import WebhookHandler
from line_bot_sdk.v3.messaging import Configuration, ApiClient, MessagingApi, ReplyMessageRequest, TextMessage

handler = WebhookHandler('YOUR_CHANNEL_SECRET')
configuration = Configuration(access_token='YOUR_CHANNEL_ACCESS_TOKEN')

@handler.add(MessageEvent, message=TextMessageContent)
def handle_message(event):
    with ApiClient(configuration) as api_client:
        line_bot_api = MessagingApi(api_client)
        line_bot_api.reply_message_with_http_info(
            ReplyMessageRequest(
                reply_token=event.reply_token,
                messages=[TextMessage(text=event.message.text)]
            )
        )

Requires Python >= 3.10.0 and valid LINE channel credentials (access token and channel secret).

Verify before relying

  • Whether the SDK handles rate limiting or retry logic automatically for API calls.
  • Specifics on async support beyond aiohttp dependency (e.g., async/await patterns in handlers).
  • Whether FlexMessage and RichMenu JSON deserialization covers all message types or has known gaps.
  • Full scope of message types and features supported by the MessagingApi client.

Package facts

License Apache License 2.0 (permissive)
Python support supports the current Python release (>=3.10.0)
Install friction low — pure-Python wheel
Runtime dependencies 8 — requests, urllib3, aiohttp, future, pydantic, aenum, python_dateutil, Deprecated
Maintenance actively maintained — 38 days since the last release
Last repo commit
First released
Downloads 11,317,145/month — #1,399 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: line_bot_sdk-3.25.0-py2.py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development

Tags

LINE bot developmentLINE messaging APIwebhook handler for LINELINE chatbot SDKLINE message sendingLINE event parsingLINE bot framework
line-messagingchatbotwebhook-handler

More Software Development packages