{ "info": { "author": "Yoong Kang Lim", "author_email": "yoongkang.lim@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "\n# Nardis\n\nA web framework based on ASGI. This is inspired by the Express framework for node.js.\n\n# Current status\n\nStill not production-ready.\n\nThis API is currently experimental, and is subject to change at any time.\n\nAs such, please don't use this for production applications yet.\n\nHowever, please do play around with it. Any feedback at this stage is welcome as the API becomes more stable.\n\n\n# Requirements\n\nPython 3.6+\n\n# Installation\n\n## Via pip\n\nRun the following:\n\n```\n$ pip install nardis\n```\n\n## From source\n\nTo build from source, clone this repo, and then:\n\n```\n$ python setup.py install\n```\n\n# Example\n\nHere's a quick example you can use. Create an `application.py` and copy and paste this:\n\n```python\nfrom nardis.asgi import main\nfrom nardis.routing import Get as get, Post as post\nimport asyncio\n\n\ntemplate_start = \"\"\"\n\n
{x}!
\", more=True)\n await asyncio.sleep(1)\n await res.send(\"liftoff!
\", more=True)\n await res.send(template_end)\n\n\nasync def hello(req, res):\n \"\"\"\n Try going to http://127.0.0.1:8000/hello/your_name/\n\n You'll see \"Hello, your_name!\"\n \"\"\"\n name = req.params.get('name', 'world')\n await res.send(f\"