{ "info": { "author": "Xiangkui Li", "author_email": "1749498702@qq.com", "bugtrack_url": null, "classifiers": [], "description": "# eweb\n**eweb**(easy web) is a fast and simple micro-framework for small web applications. Its goal is to enable you to develop\nweb applications in a simple and understandable way. \n\nWith it, you don't need to know the HTTP protocol, or how Python communicates with JavaScript. \n\n## Usage\n\n### Step1\nCreate a file, such as `main.py`: \n```python\nfrom eweb import Server\n\n\ndef hello(name):\n return 'hello %s!' % name\n\n\nif __name__ == '__main__':\n server = Server(port=5000)\n server.services['hello'] = hello\n\n server.run()\n\n```\n\n### Step2\n 1. Create a folder named `static`\n 2. Create a HTML file in the `static` folder, such as `index.html`: \n ```html\n\n\n\n \n index\n \n\n\n\n\n\n```\n \n### Step3\nRun the `main.py`. Then, visit `http://localhost:5000/index.html` in your browser.\nYou will get alert message \"hello eweb!\". \n\nIt's also easy if you want to develop desktop applications with **eweb**. At this point, usually, you need a callback function and a random port to start the server.\nWhat you need to do will be like this: \n```python\nfrom eweb import Server\n\n\ndef hello(name):\n return 'hello %s!' % name\n\n\ndef callback():\n print('Server startup completed!')\n import webbrowser\n webbrowser.open('http://localhost:%s/index.html' % server.port)\n \n\nif __name__ == '__main__':\n server = Server(port=None)\n server.services['hello'] = hello\n\n server.run()\n\n```\n\nRun `main.py`, then, after the server is started, the `index.html` page will open automatically in the browser.\n\n## Note\nThe `static` folder is a resource folder, and files under this folder can be accessed directly. So, usually, HTML, CSS, and JavaScript files should be placed in this folder, and other private files should not be placed in this folder.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lixk/eweb", "keywords": "pip,eweb", "license": "MIT Licence", "maintainer": "", "maintainer_email": "", "name": "eweb", "package_url": "https://pypi.org/project/eweb/", "platform": "any", "project_url": "https://pypi.org/project/eweb/", "project_urls": { "Homepage": "https://github.com/lixk/eweb" }, "release_url": "https://pypi.org/project/eweb/0.0.6/", "requires_dist": null, "requires_python": "", "summary": "a fast and simple micro-framework for small web applications", "version": "0.0.6" }, "last_serial": 5104347, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "6351aa77255c6d774abbb805c75c307b", "sha256": "e65ae1e09080548518c3c1eb3dbed010d022b50b30049dc6d42a7373bf9ff7a0" }, "downloads": -1, "filename": "eweb-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "6351aa77255c6d774abbb805c75c307b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4323, "upload_time": "2018-12-27T07:48:17", "url": "https://files.pythonhosted.org/packages/8a/fa/b4ec9c66effedb2d0c32a1f52c70c38f6261102cd720b42fe65f8cf86de2/eweb-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "66b81c193486f28c8225e02e04e6a672", "sha256": "622ded26c75ab818a61e491bd01ba428db4a7efb88d37adaeea720fb4c40f838" }, "downloads": -1, "filename": "eweb-0.0.1.tar.gz", "has_sig": false, "md5_digest": "66b81c193486f28c8225e02e04e6a672", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4168, "upload_time": "2018-12-27T07:48:19", "url": "https://files.pythonhosted.org/packages/62/f6/c5bab62dcfb1e83c1c40c5a555c7b5f9e647bc5ba10ac56c4b4874a4fa09/eweb-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "501300d9522b47d1a21721bed623e429", "sha256": "1db5ec83218fb7d81be82d37a37d8d227b2fa3fbf641dca81e62704140e0f246" }, "downloads": -1, "filename": "eweb-0.0.2.tar.gz", "has_sig": false, "md5_digest": "501300d9522b47d1a21721bed623e429", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4115, "upload_time": "2018-12-27T08:05:40", "url": "https://files.pythonhosted.org/packages/69/d8/199502b6f369578f4c94d6507f00fa3b7308047693a2c2eba373c2b6ed9f/eweb-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "4fbba92b9da24535f90da6d8b4458372", "sha256": "cf1890d38a9d83ca5e53ecc103d7e8ae79c9314f923a1d4ebc345706d33ba2e1" }, "downloads": -1, "filename": "eweb-0.0.3.tar.gz", "has_sig": false, "md5_digest": "4fbba92b9da24535f90da6d8b4458372", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4085, "upload_time": "2018-12-29T09:24:46", "url": "https://files.pythonhosted.org/packages/05/ef/d0ea53c7b9a71c59d0890ab3d7b6f7db5b697f7560be935730eda2e76362/eweb-0.0.3.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "f6d38abf15697b4af9128167fef0f3cc", "sha256": "3b55153f9eb6f9d8ef49f2e536b7d3f4f5a4a1a8d02563c2d9afc43d90199afe" }, "downloads": -1, "filename": "eweb-0.0.5.tar.gz", "has_sig": false, "md5_digest": "f6d38abf15697b4af9128167fef0f3cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4105, "upload_time": "2019-01-02T09:46:56", "url": "https://files.pythonhosted.org/packages/e8/91/770638d2e97fa03ff48e4caace168ab6b1acccb3f0b3599a624186a15363/eweb-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "f043af58852e60cbce98acf1220b86d8", "sha256": "f3c92de29dd1dd1b7483148bb148657a0a3b9c51a084a8143693c7eec37cb904" }, "downloads": -1, "filename": "eweb-0.0.6.tar.gz", "has_sig": false, "md5_digest": "f043af58852e60cbce98acf1220b86d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4100, "upload_time": "2019-04-05T15:45:37", "url": "https://files.pythonhosted.org/packages/3c/a6/78a6c2ea68db3a9cbabc15c6ef4f6ad7c2c60f349257697498f79d3f9757/eweb-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f043af58852e60cbce98acf1220b86d8", "sha256": "f3c92de29dd1dd1b7483148bb148657a0a3b9c51a084a8143693c7eec37cb904" }, "downloads": -1, "filename": "eweb-0.0.6.tar.gz", "has_sig": false, "md5_digest": "f043af58852e60cbce98acf1220b86d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4100, "upload_time": "2019-04-05T15:45:37", "url": "https://files.pythonhosted.org/packages/3c/a6/78a6c2ea68db3a9cbabc15c6ef4f6ad7c2c60f349257697498f79d3f9757/eweb-0.0.6.tar.gz" } ] }