LINE Messaging API SDK for Python
=================================
|PyPI version|
SDK of the LINE Messaging API for Python.
Introduction
------------
The LINE Messaging API SDK for Python makes it easy to develop bots using LINE Messaging API, and you can create a sample bot within minutes.
Documentation
-------------
See the official API documentation for more information
English: https://developers.line.biz/en/docs/messaging-api/overview/
Japanese: https://developers.line.biz/ja/docs/messaging-api/overview/
Requirements
------------
- Python >= 3.9
Installation
------------
::
$ pip install line-bot-sdk
Synopsis
--------
Usage:
.. code:: python
from flask import Flask, request, abort
from linebot.v3 import (
WebhookHandler
)
from linebot.v3.exceptions import (
InvalidSignatureError
)
from linebot.v3.messaging import (
Configuration,
ApiClient,
MessagingApi,
ReplyMessageRequest,
TextMessage
)
from linebot.v3.webhooks import (
MessageEvent,
TextMessageContent
)
app = Flask(__name__)
configuration = Configuration(access_token='YOUR_CHANNEL_ACCESS_TOKEN')
handler = WebhookHandler('YOUR_CHANNEL_SECRET')
@app.route("/callback", methods=['POST'])
def callback():
# get X-Line-Signature header value
signature = request.headers['X-Line-Signature']
# get request body as text
body = request.get_data(as_text=True)
app.logger.info("Request body: " + body)
# handle webhook body
try:
handler.handle(body, signature)
except InvalidSignatureError:
app.logger.info("Invalid signature. Please check your channel access token/channel secret.")
abort(400)
return 'OK'
@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)]
)
)
if __name__ == "__main__":
app.run()
API
---
See `linebot/v3/messaging/docs <linebot/v3/messaging/docs/MessagingApi.md>`__ . Other docs are in ``linebot/v3/<feature>/docs/*.md``.
Webhook
-------
WebhookParser
~~~~~~~~~~~~~
※ You can use WebhookParser
\_\_init\_\_(self, channel\_secret)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code:: python
parser = linebot.v3.WebhookParser('YOUR_CHANNEL_SECRET')
parse(self, body, signature, as_payload=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Parses the webhook body, and returns a list of Event objects or a WebhookPayload object (depending on as_payload).
If the signature does NOT match, ``InvalidSignatureError`` is raised.
.. code:: python
events = parser.parse(body, signature)
for event in events:
do_something(event)
.. code:: python
payload = parser.parse(body, signature, as_payload=True)
for event in payload.events:
do_something(payload.event, payload.destination)
WebhookHandler
~~~~~~~~~~~~~~
※ You can use WebhookHandler
\_\_init\_\_(self, channel\_secret)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code:: python
handler = linebot.v3.WebhookHandler('YOUR_CHANNEL_SECRET')
handle(self, body, signature)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Handles webhooks with **handlers** added
by the decorators `add <#add-self-event-message-none>`__ and `default <#default-self>`__.
If the signature does NOT match, ``InvalidSignatureError`` is raised.
.. code:: python
handler.handle(body, signature)
add(self, event, message=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Add a **handler** method by using this decorator.
.. code:: python
@handler.add(MessageEvent, message=TextMessage)
def handle_message(event):
line_bot_api.reply_message(
ReplyMessageRequest(
reply_token=event.reply_token,
messages=[TextMessage(text=event.message.text)]
)
)
When the event is an instance of MessageEvent and event.message is an instance of TextMessage,
this handler method is called.
.. code:: python
@handler.add(MessageEvent)
def handle_message(event, destination):
# do something
If the arity of the handler method is more than one,
a destination property in a webhook request is passed to it as the second argument.
.. code:: python
@handler.add(FollowEvent)
def handle_follow():
# do something
If the arity of the handler method is zero, the handler method is called with no arguments.
default(self)
^^^^^^^^^^^^^
Set the default **handler** method by using this decorator.
.. code:: python
@handler.default()
def default(event):
print(event)
If there is no handler for an event, this default handler method is called.
WebhookPayload
~~~~~~~~~~~~~~~
https://developers.line.biz/en/reference/messaging-api/#request-body
- WebhookPayload
- destination
- events: list[`Event`]
Webhook event object
~~~~~~~~~~~~~~~~~~~~
https://developers.line.biz/en/reference/messaging-api/#webhook-event-objects
Hints
-----
Examples
~~~~~~~~
`aiohttp-echo <examples/aiohttp-echo>`__
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sample echo-bot with asynchronous processings.
`fastapi-echo <examples/fastapi-echo>`__
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sample echo-bot using `FastAPI <https://fastapi.tiangolo.com/>`__
`flask-echo <examples/flask-echo>`__
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sample echo-bot using `Flask <http://flask.pocoo.org/>`__
`flask-kitchensink <examples/flask-kitchensink>`__
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sample bot using `Flask <http://flask.pocoo.org/>`__
`rich-menu <examples/rich-menu>`__
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Switching richmenu script
`simple-server-echo <examples/simple-server-echo>`__
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sample echo-bot using
`wsgiref.simple\_server <https://docs.python.org/3/library/wsgiref.html>`__
How to deserializes JSON to FlexMessage or RichMenu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
line-bot-python-sdk provides ``from_json`` method for each model.
It deserializes the JSON into the specified model.
Thus, you can send a JSON designed with `Flex Message Simulator <https://developers.line.biz/console/fx/>`__.
.. code:: python
bubble_string = """{ type:"bubble", ... }"""
message = FlexMessage(alt_text="hello", contents=FlexContainer.from_json(bubble_string))
line_bot_api.reply_message(
ReplyMessageRequest(
reply_token=event.reply_token,
messages=[message]
)
)
How to get x-line-request-id header and error message
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You may need to store the ``x-line-request-id`` header obtained as a response from several APIs.
In this case, please use ``~_with_http_info`` functions. You can get headers and status codes.
The ``x-line-accepted-request-id`` or ``content-type`` header can also be obtained in the same way.
.. code:: python
response = line_bot_api.reply_message_with_http_info(
ReplyMessageRequest(
reply_token=event.reply_token,
messages=[TextMessage(text='see application log')]
)
)
app.logger.info("Got response with http status code: " + str(response.status_code))
app.logger.info("Got x-line-request-id: " + response.headers['x-line-request-id'])
app.logger.info("Got response with http body: " + str(response.data))
You can get error messages from ``ApiException`` when you use ``MessagingApi``. Each client defines its own exception class.
.. code:: python
from linebot.v3.messaging import ApiException, ErrorResponse
try:
line_bot_api.reply_message_with_http_info(
ReplyMessageRequest(
reply_token='invalid-reply-token',
messages=[TextMessage(text='see application log')]
)
)
except ApiException as e:
app.logger.info("Got response with http status code: " + str(e.status))
app.logger.info("Got x-line-request-id: " + e.headers['x-line-request-id'])
app.logger.info("Got response with http body: " + str(ErrorResponse.from_json(e.body)))
When you need to get ``x-line-accepted-request-id`` header from error response, you can get it: ``e.headers['x-line-accepted-request-id']``.
Help and media
--------------
FAQ: https://developers.line.biz/en/faq/
News: https://developers.line.biz/en/news/
Versioning
----------
This project respects semantic versioning
See http://semver.org/
Version 3.x
-----------
LINE's SDK developer team decided to generate SDK code based on OpenAPI spec. https://github.com/line/line-openapi
As a result, LINE bot sdk 3.x is not compatible with 2.x. It can follow the future API changes very quickly.
We will be maintaining only ``linebot.v3`` going forward.
To utilize the latest features, we recommend you gradually transition to ``linebot.v3`` modules in your application, although you can still continue to use the 2.x ``linebot`` modules.
While we won't update ``linebot`` modules anymore, users can still continue to use the version 2.x ``linebot`` modules.
We also welcome pull requests for the version ``2.x`` and ``3.x`` modules.
How to suppress deprecation warnings
------------------------------------
If you keep using old line-bot-sdk library (``version < 3.x``) but use ``3.x``, you'll get
::
LineBotSdkDeprecatedIn30: Call to deprecated method get_bot_info. (Use 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_bot_info(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.) -- Deprecated since version 3.0.0.
If it's noisy, you can suppress this warning as follows.
.. code:: python
import warnings
from linebot import LineBotSdkDeprecatedIn30
## your code here
...
if __name__ == '__main__':
warnings.filterwarnings("ignore", category=LineBotSdkDeprecatedIn30)
Contributing
------------
Please check `CONTRIBUTING <CONTRIBUTING.md>`__ before making a contribution.
For SDK developers
------------------
First install for development.
::
$ pip install -r requirements-dev.txt
You can generate new or fixed models and APIs by this command.
::
$ python generate-code.py
When you update line-bot-sdk-python version, please update `linebot/__about__.py <linebot/__about__.py>`__ and generate code again.
If you edit `README.rst <README.rst>`__, you should execute the following command to check the syntax of README.
::
$ python -m readme_renderer README.rst
Run tests
~~~~~~~~~
Test by using tox. We test against the following versions.
- 3.9
- 3.10
- 3.11
- 3.12
To run all tests and to run ``flake8`` against all versions, use:
::
tox
To run all tests against version 3.10, use:
::
$ tox -e py3.10
To run a test against version 3.10 and against a specific file, use:
::
$ tox -e py3.10 -- tests/test_webhook.py
.. |PyPI version| image:: https://badge.fury.io/py/line-bot-sdk.svg
:target: https://badge.fury.io/py/line-bot-sdk
License
--------
::
Copyright (C) 2016 LINE Corp.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Raw data
{
"_id": null,
"home_page": "https://github.com/line/line-bot-sdk-python",
"name": "line-bot-sdk",
"maintainer": "RyosukeHasebe",
"docs_url": null,
"requires_python": ">=3.9.0",
"maintainer_email": "hsb.1014@gmail.com",
"keywords": null,
"author": "RyosukeHasebe",
"author_email": "hsb.1014@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/ec/32/f2944c3c066ebb9a580929831c2f4b548b7bfb1681446ebe8ef2faf8153e/line_bot_sdk-3.16.0.tar.gz",
"platform": null,
"description": "LINE Messaging API SDK for Python\n=================================\n\n|PyPI version|\n\nSDK of the LINE Messaging API for Python.\n\nIntroduction\n------------\nThe LINE Messaging API SDK for Python makes it easy to develop bots using LINE Messaging API, and you can create a sample bot within minutes.\n\n\nDocumentation\n-------------\n\nSee the official API documentation for more information\n\nEnglish: https://developers.line.biz/en/docs/messaging-api/overview/\n\nJapanese: https://developers.line.biz/ja/docs/messaging-api/overview/\n\nRequirements\n------------\n\n- Python >= 3.9\n\nInstallation\n------------\n\n::\n\n $ pip install line-bot-sdk\n\nSynopsis\n--------\n\nUsage:\n\n.. code:: python\n\n from flask import Flask, request, abort\n\n from linebot.v3 import (\n WebhookHandler\n )\n from linebot.v3.exceptions import (\n InvalidSignatureError\n )\n from linebot.v3.messaging import (\n Configuration,\n ApiClient,\n MessagingApi,\n ReplyMessageRequest,\n TextMessage\n )\n from linebot.v3.webhooks import (\n MessageEvent,\n TextMessageContent\n )\n\n app = Flask(__name__)\n\n configuration = Configuration(access_token='YOUR_CHANNEL_ACCESS_TOKEN')\n handler = WebhookHandler('YOUR_CHANNEL_SECRET')\n\n\n @app.route(\"/callback\", methods=['POST'])\n def callback():\n # get X-Line-Signature header value\n signature = request.headers['X-Line-Signature']\n\n # get request body as text\n body = request.get_data(as_text=True)\n app.logger.info(\"Request body: \" + body)\n\n # handle webhook body\n try:\n handler.handle(body, signature)\n except InvalidSignatureError:\n app.logger.info(\"Invalid signature. Please check your channel access token/channel secret.\")\n abort(400)\n\n return 'OK'\n\n\n @handler.add(MessageEvent, message=TextMessageContent)\n def handle_message(event):\n with ApiClient(configuration) as api_client:\n line_bot_api = MessagingApi(api_client)\n line_bot_api.reply_message_with_http_info(\n ReplyMessageRequest(\n reply_token=event.reply_token,\n messages=[TextMessage(text=event.message.text)]\n )\n )\n\n if __name__ == \"__main__\":\n app.run()\n\nAPI\n---\n\nSee `linebot/v3/messaging/docs <linebot/v3/messaging/docs/MessagingApi.md>`__ . Other docs are in ``linebot/v3/<feature>/docs/*.md``.\n\n\nWebhook\n-------\n\nWebhookParser\n~~~~~~~~~~~~~\n\n\u203b You can use WebhookParser\n\n\\_\\_init\\_\\_(self, channel\\_secret)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: python\n\n parser = linebot.v3.WebhookParser('YOUR_CHANNEL_SECRET')\n\nparse(self, body, signature, as_payload=False)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nParses the webhook body, and returns a list of Event objects or a WebhookPayload object (depending on as_payload).\nIf the signature does NOT match, ``InvalidSignatureError`` is raised.\n\n.. code:: python\n\n events = parser.parse(body, signature)\n\n for event in events:\n do_something(event)\n\n.. code:: python\n\n payload = parser.parse(body, signature, as_payload=True)\n\n for event in payload.events:\n do_something(payload.event, payload.destination)\n\nWebhookHandler\n~~~~~~~~~~~~~~\n\n\u203b You can use WebhookHandler\n\n\\_\\_init\\_\\_(self, channel\\_secret)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: python\n\n handler = linebot.v3.WebhookHandler('YOUR_CHANNEL_SECRET')\n\nhandle(self, body, signature)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nHandles webhooks with **handlers** added\nby the decorators `add <#add-self-event-message-none>`__ and `default <#default-self>`__.\nIf the signature does NOT match, ``InvalidSignatureError`` is raised.\n\n.. code:: python\n\n handler.handle(body, signature)\n\nadd(self, event, message=None)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nAdd a **handler** method by using this decorator.\n\n.. code:: python\n\n @handler.add(MessageEvent, message=TextMessage)\n def handle_message(event):\n line_bot_api.reply_message(\n ReplyMessageRequest(\n reply_token=event.reply_token,\n messages=[TextMessage(text=event.message.text)]\n )\n )\n\nWhen the event is an instance of MessageEvent and event.message is an instance of TextMessage,\nthis handler method is called.\n\n.. code:: python\n\n @handler.add(MessageEvent)\n def handle_message(event, destination):\n # do something\n\nIf the arity of the handler method is more than one,\na destination property in a webhook request is passed to it as the second argument.\n\n.. code:: python\n\n @handler.add(FollowEvent)\n def handle_follow():\n # do something\n\nIf the arity of the handler method is zero, the handler method is called with no arguments.\n\ndefault(self)\n^^^^^^^^^^^^^\n\nSet the default **handler** method by using this decorator.\n\n.. code:: python\n\n @handler.default()\n def default(event):\n print(event)\n\nIf there is no handler for an event, this default handler method is called.\n\nWebhookPayload\n~~~~~~~~~~~~~~~\n\nhttps://developers.line.biz/en/reference/messaging-api/#request-body\n\n- WebhookPayload\n - destination\n - events: list[`Event`]\n\nWebhook event object\n~~~~~~~~~~~~~~~~~~~~\n\nhttps://developers.line.biz/en/reference/messaging-api/#webhook-event-objects\n\n\nHints\n-----\n\nExamples\n~~~~~~~~\n\n`aiohttp-echo <examples/aiohttp-echo>`__\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nSample echo-bot with asynchronous processings.\n\n`fastapi-echo <examples/fastapi-echo>`__\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nSample echo-bot using `FastAPI <https://fastapi.tiangolo.com/>`__\n\n\n`flask-echo <examples/flask-echo>`__\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nSample echo-bot using `Flask <http://flask.pocoo.org/>`__\n\n`flask-kitchensink <examples/flask-kitchensink>`__\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nSample bot using `Flask <http://flask.pocoo.org/>`__\n\n\n`rich-menu <examples/rich-menu>`__\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nSwitching richmenu script\n\n`simple-server-echo <examples/simple-server-echo>`__\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nSample echo-bot using\n`wsgiref.simple\\_server <https://docs.python.org/3/library/wsgiref.html>`__\n\n\nHow to deserializes JSON to FlexMessage or RichMenu\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nline-bot-python-sdk provides ``from_json`` method for each model.\nIt deserializes the JSON into the specified model.\nThus, you can send a JSON designed with `Flex Message Simulator <https://developers.line.biz/console/fx/>`__.\n\n.. code:: python\n\n bubble_string = \"\"\"{ type:\"bubble\", ... }\"\"\"\n message = FlexMessage(alt_text=\"hello\", contents=FlexContainer.from_json(bubble_string))\n line_bot_api.reply_message(\n ReplyMessageRequest(\n reply_token=event.reply_token,\n messages=[message]\n )\n )\n\nHow to get x-line-request-id header and error message\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou may need to store the ``x-line-request-id`` header obtained as a response from several APIs.\nIn this case, please use ``~_with_http_info`` functions. You can get headers and status codes.\nThe ``x-line-accepted-request-id`` or ``content-type`` header can also be obtained in the same way.\n\n.. code:: python\n\n response = line_bot_api.reply_message_with_http_info(\n ReplyMessageRequest(\n reply_token=event.reply_token,\n messages=[TextMessage(text='see application log')]\n )\n )\n app.logger.info(\"Got response with http status code: \" + str(response.status_code))\n app.logger.info(\"Got x-line-request-id: \" + response.headers['x-line-request-id'])\n app.logger.info(\"Got response with http body: \" + str(response.data))\n\nYou can get error messages from ``ApiException`` when you use ``MessagingApi``. Each client defines its own exception class.\n\n.. code:: python\n\n from linebot.v3.messaging import ApiException, ErrorResponse\n try:\n line_bot_api.reply_message_with_http_info(\n ReplyMessageRequest(\n reply_token='invalid-reply-token',\n messages=[TextMessage(text='see application log')]\n )\n )\n except ApiException as e:\n app.logger.info(\"Got response with http status code: \" + str(e.status))\n app.logger.info(\"Got x-line-request-id: \" + e.headers['x-line-request-id'])\n app.logger.info(\"Got response with http body: \" + str(ErrorResponse.from_json(e.body)))\n\nWhen you need to get ``x-line-accepted-request-id`` header from error response, you can get it: ``e.headers['x-line-accepted-request-id']``.\n\n\nHelp and media\n--------------\nFAQ: https://developers.line.biz/en/faq/\n\nNews: https://developers.line.biz/en/news/\n\nVersioning\n----------\nThis project respects semantic versioning\n\nSee http://semver.org/\n\n\nVersion 3.x\n-----------\nLINE's SDK developer team decided to generate SDK code based on OpenAPI spec. https://github.com/line/line-openapi\n\nAs a result, LINE bot sdk 3.x is not compatible with 2.x. It can follow the future API changes very quickly.\n\nWe will be maintaining only ``linebot.v3`` going forward.\nTo utilize the latest features, we recommend you gradually transition to ``linebot.v3`` modules in your application, although you can still continue to use the 2.x ``linebot`` modules.\n\nWhile we won't update ``linebot`` modules anymore, users can still continue to use the version 2.x ``linebot`` modules.\nWe also welcome pull requests for the version ``2.x`` and ``3.x`` modules.\n\n\nHow to suppress deprecation warnings\n------------------------------------\nIf you keep using old line-bot-sdk library (``version < 3.x``) but use ``3.x``, you'll get\n\n::\n\n LineBotSdkDeprecatedIn30: Call to deprecated method get_bot_info. (Use 'from linebot.v3.messaging import MessagingApi' and 'MessagingApi(...).get_bot_info(...)' instead. See https://github.com/line/line-bot-sdk-python/blob/master/README.rst for more details.) -- Deprecated since version 3.0.0.\n\n\nIf it's noisy, you can suppress this warning as follows.\n\n\n.. code:: python\n\n import warnings\n from linebot import LineBotSdkDeprecatedIn30\n\n ## your code here\n ...\n\n if __name__ == '__main__':\n warnings.filterwarnings(\"ignore\", category=LineBotSdkDeprecatedIn30)\n\n\nContributing\n------------\nPlease check `CONTRIBUTING <CONTRIBUTING.md>`__ before making a contribution.\n\nFor SDK developers\n------------------\n\nFirst install for development.\n\n::\n\n $ pip install -r requirements-dev.txt\n\n\nYou can generate new or fixed models and APIs by this command.\n\n::\n\n $ python generate-code.py\n\n\nWhen you update line-bot-sdk-python version, please update `linebot/__about__.py <linebot/__about__.py>`__ and generate code again.\n\n\nIf you edit `README.rst <README.rst>`__, you should execute the following command to check the syntax of README.\n\n::\n\n $ python -m readme_renderer README.rst\n\n\nRun tests\n~~~~~~~~~\n\nTest by using tox. We test against the following versions.\n\n- 3.9\n- 3.10\n- 3.11\n- 3.12\n\nTo run all tests and to run ``flake8`` against all versions, use:\n\n::\n\n tox\n\nTo run all tests against version 3.10, use:\n\n::\n\n $ tox -e py3.10\n\nTo run a test against version 3.10 and against a specific file, use:\n\n::\n\n $ tox -e py3.10 -- tests/test_webhook.py\n\n\n.. |PyPI version| image:: https://badge.fury.io/py/line-bot-sdk.svg\n :target: https://badge.fury.io/py/line-bot-sdk\n\nLicense\n--------\n\n::\n\n Copyright (C) 2016 LINE Corp.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n",
"bugtrack_url": null,
"license": "Apache License 2.0",
"summary": "LINE Messaging API SDK for Python",
"version": "3.16.0",
"project_urls": {
"Homepage": "https://github.com/line/line-bot-sdk-python"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9622608d73c28d58d1de40edd6c4b669396a962ff4809f4660ca48fb3105fe9d",
"md5": "aa5cdefd53265b0c72f2481aa5069310",
"sha256": "8c0e627c88a665a4579a0664a262a015723eeb46d4de9685a055f6effb266b23"
},
"downloads": -1,
"filename": "line_bot_sdk-3.16.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "aa5cdefd53265b0c72f2481aa5069310",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.9.0",
"size": 779824,
"upload_time": "2025-02-13T10:02:01",
"upload_time_iso_8601": "2025-02-13T10:02:01.265549Z",
"url": "https://files.pythonhosted.org/packages/96/22/608d73c28d58d1de40edd6c4b669396a962ff4809f4660ca48fb3105fe9d/line_bot_sdk-3.16.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ec32f2944c3c066ebb9a580929831c2f4b548b7bfb1681446ebe8ef2faf8153e",
"md5": "ae6b242126c0a11865db6660f6b6e6fc",
"sha256": "3ae3352cec5f73334a8e2fd60c67b461c712af4f5485b8be2964ba17eb730ad5"
},
"downloads": -1,
"filename": "line_bot_sdk-3.16.0.tar.gz",
"has_sig": false,
"md5_digest": "ae6b242126c0a11865db6660f6b6e6fc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9.0",
"size": 457108,
"upload_time": "2025-02-13T10:02:03",
"upload_time_iso_8601": "2025-02-13T10:02:03.316653Z",
"url": "https://files.pythonhosted.org/packages/ec/32/f2944c3c066ebb9a580929831c2f4b548b7bfb1681446ebe8ef2faf8153e/line_bot_sdk-3.16.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-13 10:02:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "line",
"github_project": "line-bot-sdk-python",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "requests",
"specs": [
[
"<",
"3"
],
[
">=",
"2.32.3"
]
]
},
{
"name": "urllib3",
"specs": [
[
"<",
"3"
],
[
">=",
"2.0.5"
]
]
},
{
"name": "aiohttp",
"specs": [
[
">=",
"3.10.9"
]
]
},
{
"name": "future",
"specs": []
},
{
"name": "pydantic",
"specs": [
[
">=",
"2.0.3"
],
[
"<",
"3"
]
]
},
{
"name": "aenum",
"specs": [
[
">=",
"3.1.11"
]
]
},
{
"name": "python_dateutil",
"specs": [
[
">=",
"2.5.3"
]
]
},
{
"name": "Deprecated",
"specs": []
}
],
"tox": true,
"lcname": "line-bot-sdk"
}