{"id":21569347,"url":"https://github.com/aweirddev/linex","last_synced_at":"2026-06-29T02:31:05.532Z","repository":{"id":188394120,"uuid":"678660033","full_name":"AWeirdDev/linex","owner":"AWeirdDev","description":"✨ The fast and easy-to-use LINE bot SDK.","archived":false,"fork":false,"pushed_at":"2023-10-28T03:26:04.000Z","size":110,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-12T08:27:21.576Z","etag":null,"topics":["line","line-bot","line-sdk","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/linex","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AWeirdDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-15T04:07:15.000Z","updated_at":"2023-09-03T04:11:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"90171f45-2804-4a3e-afa7-86635c605a46","html_url":"https://github.com/AWeirdDev/linex","commit_stats":null,"previous_names":["aweirdscratcher/linex","aweirddev/linex"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AWeirdDev/linex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWeirdDev%2Flinex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWeirdDev%2Flinex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWeirdDev%2Flinex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWeirdDev%2Flinex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AWeirdDev","download_url":"https://codeload.github.com/AWeirdDev/linex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AWeirdDev%2Flinex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34911134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["line","line-bot","line-sdk","python"],"created_at":"2024-11-24T11:09:13.593Z","updated_at":"2026-06-29T02:31:05.509Z","avatar_url":"https://github.com/AWeirdDev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n\u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/AWeirdScratcher/linex/assets/90096971/befa28f0-f5a5-4962-b58e-dd08c7cee002\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/AWeirdScratcher/linex/assets/90096971/a5687590-f8d3-4feb-b452-e405918c72c7\"\u003e\n    \u003cimg alt=\"LineX By Ramptix\" src=\"https://github.com/AWeirdScratcher/linex/assets/90096971/a5687590-f8d3-4feb-b452-e405918c72c7\"\u003e\n\u003c/picture\u003e\n\n\u003cdiv\u003e\u003cbr /\u003e\u003c/div\u003e\n\nThe fast and easy-to-use LINE bot SDK. Focus on the content, we do the rest.\n\n\u003c!-- CTA button --\u003e\n\n\u003ca href=\"/\"\u003e\n    \u003cpicture\u003e\n        \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/AWeirdScratcher/linex/assets/90096971/8b69a4f5-6c4b-410c-8f88-92cfe06a73a0\" width=\"150\"\u003e\n        \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/AWeirdScratcher/linex/assets/90096971/ae2669a3-4b2c-4a14-929a-9b42caef3571\" width=\"150\"\u003e\n        \u003cimg alt=\"LineX By Ramptix\" src=\"https://github.com/AWeirdScratcher/linex/assets/90096971/ae2669a3-4b2c-4a14-929a-9b42caef3571\" width=\"150\"\u003e\n    \u003c/picture\u003e\n\u003c/a\u003e\n\n\u003cimg\n    src=\"https://github.com/AWeirdScratcher/linex/assets/90096971/b435ae9a-a4d2-4689-a171-3978951983d7\"\n    alt=\"pip install -U linex\"\n    width=\"510\"\n/\u003e\n\n[![By Ramptix](https://img.shields.io/badge/%E2%AC%9C%20%E2%94%82%20By%20Ramptix-%23202020?style=for-the-badge)](https://github.com/ramptix)\n\n\u003c/div\u003e\n\n## Features\n\nIt's (or it has):\n\n- Based on [FastAPI](https://fastapi.tiangolo.com)\n- Feature-rich\n- Async-ready\n- Around 60% coverage of the LINE API [(Contribute)](https://github.com/AWeirdScratcher/linex/fork)\n- Better type hints than [linelib](https://github.com/AWeirdScratcher/linelib) (my previous work)\n\n\u003csub\u003e(Not affiliated with The X Corp.)\u003c/sub\u003e\n\n## Feel The Simplicity\n\nCode snippets explain more than words. Take a look:\n\n```python\nfrom linex import Client, TextMessageContext\n\nclient = Client(\"channel secret\", \"channel access token\")\n\n@client.event\nasync def on_ready():\n    print(f\"Logged in as {client.user.name}\")\n\n@client.event\nasync def on_text(ctx: TextMessageContext):\n    await ctx.reply(\"Hello, World!\")\n\nclient.run()\n```\n\nThat's it. Say no more to additional setups — they're so annoying!\n\n## Documentation\n\nCurrently, there is no documentation for LineX — yet I'm working on it. In the meantime, type hints and code editors are the best documentation sources.\n\n## Extensions\n\n\u003cdiv align=\"center\"\u003e\n\n### Notify Support\n![Notify Banner](https://scdn.line-apps.com/n/line_notice/img/pc/img_lp02_en.png)\n\n\n\u003c/div\u003e\n\nLineX also supports LINE notify, including push message sending and OAuth2.\n\nHere's a simple notify bot:\n\n```python\nfrom linex.ext import Notify\n\nnotify = Notify(\"access token\")\n\nnotify.notify_sync(\n    \"Hello, World!\"\n)\n```\n\n### Locale\n\nHave users that use different languages? Try out the `Locale` extension.\n\nFirst, define a file structure like so:\n\n```haskell\ni18n/\n├─ _meta.json\n├─ food.json\n```\n\nInside of `_meta.json`, define the available locales:\n\n```json\n{\n    \"locales\": [\"en-US\", \"zh-Hant\"]\n}\n```\n\nThe locales above are just examples.\n\nThen, create any JSON file with a specific topic (category) under the directory that stores locale strings.\n\nIn this case, `food.json` would look like:\n\n```json\n{\n    \"pizza\": {\n        \"en-US\": \"pizza\",\n        \"zh-Hant\": \"披薩\"\n    },\n    \"describe\": {\n        \"en-US\": \"{food} tastes good!\",\n        \"zh-Hant\": \"{food} 很好吃！\"\n    }\n}\n```\n\nThe first key (`pizza`) and the second one (`describe`) stores locale strings with keys defined in the `locales` field in `_meta.json`.\n\nAdditionally, if you add texts surrounded by `{}`, it would be considered as an argument that's ready to be passed in. In the above example, `\"{food} tastes good!\"`, implies that the `{food}` field would be replaced with a food name later in the Python code.\n\nFinally, define our LINE bot:\n\n```python\nfrom linex import Client\nfrom linex.ext import Locale\n\nclient = Client(\"channel secret\", \"channel access token\")\nlocale = Locale(\n    \"i18n\", # the locale strings directory\n    sorted_by=\"categories\" # files split by categories\n)\n\n@client.event\nasync def on_text(ctx):\n    loc = await locale(ctx) # get locale for this user\n    \n    await ctx.reply(\n        loc(\n            \"food/describe\", # use \u003ccategory\u003e/\u003ckey name\u003e to get\n            food=loc(\"food/pizza\") # the argument (pizza)\n        )\n    )\n\nclient.run()\n```\n\n***\n\n(c) 2023 AWeirdScratcher (AWeirdDev)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faweirddev%2Flinex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faweirddev%2Flinex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faweirddev%2Flinex/lists"}