{"id":13717913,"url":"https://github.com/joway/lemon","last_synced_at":"2025-03-17T06:31:25.105Z","repository":{"id":28010711,"uuid":"115845807","full_name":"joway/lemon","owner":"joway","description":"An async and lightweight API framework for python.","archived":false,"fork":false,"pushed_at":"2023-03-07T22:03:35.000Z","size":626,"stargazers_count":30,"open_issues_count":10,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-27T18:58:43.850Z","etag":null,"topics":["async","koa-style","python","restful-api","uvloop","web-framework"],"latest_commit_sha":null,"homepage":"https://pylemon.com","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/joway.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","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}},"created_at":"2017-12-31T05:55:43.000Z","updated_at":"2024-07-17T16:35:38.000Z","dependencies_parsed_at":"2024-01-17T09:22:13.367Z","dependency_job_id":"11bd8989-6446-4b02-9e81-281b925cc695","html_url":"https://github.com/joway/lemon","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joway%2Flemon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joway%2Flemon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joway%2Flemon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joway%2Flemon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joway","download_url":"https://codeload.github.com/joway/lemon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243847060,"owners_count":20357317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["async","koa-style","python","restful-api","uvloop","web-framework"],"created_at":"2024-08-03T00:01:29.067Z","updated_at":"2025-03-17T06:31:24.340Z","avatar_url":"https://github.com/joway.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://pylemon.com\" target=\"_blank\"\u003e\u003cimg width=\"100%\" src=\"docs/images/lemon-long.png\" alt=\"Lemon logo\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003ca target=\"_blank\" href=\"https://travis-ci.org/joway/lemon\"\u003e\u003cimg src=\"https://travis-ci.org/joway/lemon.svg?branch=master\" alt=\"Build Status\"\u003e\u003c/a\u003e\n   \u003ca target=\"_blank\" href=\"https://coveralls.io/github/joway/lemon?branch=master\"\u003e\u003cimg src=\"https://coveralls.io/repos/github/joway/lemon/badge.svg?branch=master\" alt=\"Coverage Status\"\u003e\u003c/a\u003e\n   \u003ca target=\"_blank\" href=\"https://www.codacy.com/app/joway/lemon?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=joway/lemon\u0026amp;utm_campaign=Badge_Grade\"\u003e\u003cimg src=\"https://api.codacy.com/project/badge/Grade/f7f2ffd3c5f74732bb445e4cde9216a8\" alt=\"Codacy Badge\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\t\u003ca target=\"_blank\" href=\"https://pypi.python.org/pypi/pylemon\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/pylemon.svg\" alt=\"PyPi Version\"\u003e\u003c/a\u003e\n\t\u003ca target=\"_blank\" href=\"https://pypi.python.org/pypi/pylemon\"\u003e\u003cimg src=\"https://img.shields.io/pypi/pyversions/pylemon.svg\" alt=\"Python Version\"\u003e\u003c/a\u003e\n   \u003ca target=\"_blank\" href=\"https://pypi.python.org/pypi/pylemon\"\u003e\u003cimg src=\"https://img.shields.io/pypi/status/pylemon.svg\" alt=\"PyPI\"\u003e\u003c/a\u003e\n   \u003ca target=\"_blank\" href=\"https://github.com/joway/lemon/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/joway/lemon.svg\" alt=\"license\"\u003e\u003c/a\u003e\n   \u003ca target=\"_blank\" href=\"https://app.fossa.io/projects/git%2Bgithub.com%2Fjoway%2Flemon?ref=badge_shield\"\u003e\u003cimg src=\"https://app.fossa.io/api/projects/git%2Bgithub.com%2Fjoway%2Flemon.svg?type=shield\" alt=\"FOSSA Status\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch5 align=\"center\"\u003eLemon is an async and lightweight API framework for python .  Inspired by \u003ca src=\"https://github.com/koajs/koa\" target=\"_blank\"\u003eKoa\u003c/a\u003e and \u003ca src=\"https://github.com/channelcat/sanic\" target=\"_blank\"\u003e Sanic \u003c/a\u003e .\u003c/h5\u003e\n\n## Documentation\n\n[https://pylemon.com](https://pylemon.com/#/)\n\n## Installation\n\n```shell\npip install -U pylemon\n```\n\n## Hello Lemon\n\n```python\nfrom lemon.app import Lemon\nfrom lemon.context import Context\n\nasync def middleware(ctx: Context, nxt):\n    ctx.body = {\n        'msg': 'hello lemon'\n    }\n    await nxt()\n\n\nasync def handler(ctx: Context):\n    ctx.body['ack'] = 'yeah !'\n\napp = Lemon()\n\napp.use(middleware, handler)\n\napp.listen(port=9999)\n\n```\n\n## Hello Lemon Router\n\n```python\nfrom random import random\n\nfrom lemon.app import Lemon\nfrom lemon.context import Context\nfrom lemon.router import Router\n\n\nasync def middleware(ctx: Context, nxt):\n    ctx.body = {\n        'msg': 'hello lemon'\n    }\n    await nxt()\n\n\nasync def handler1(ctx: Context):\n    ctx.body['ack'] = 'yeah !'\n    ctx.body['random'] = random()\n\n\nasync def handler2(ctx: Context):\n    ctx.body = ctx.req.json\n\n\napp = Lemon(debug=True)\n\nrouter = Router()\nrouter.get('/handler1', middleware, handler1)\nrouter.post('/handler2', middleware, handler2)\n\napp.use(router.routes())\n\napp.listen()\n\n```\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoway%2Flemon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoway%2Flemon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoway%2Flemon/lists"}