lessweb


Namelessweb JSON
Version 1.2.0 PyPI version JSON
download
home_pageNone
SummaryA pythonic web framework
upload_time2024-04-07 07:34:17
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseApache 2
keywords lessweb web web.py aiohttp
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # lessweb
>「嘞是web」

Lessweb is an extremely easy-to-use python web framework with the following goals.

* Simple and efficient: based on the aiohttp library IOC capabilities, native support for configuration loading and logging settings to meet production-level development requirements
* Pythonic: support for the latest python version and the latest python syntax

## Install lessweb

To install the latest lessweb for Python 3, please run:

```shell
pip3 install lessweb
```

## Hello, world!

Save the code below in file `index.py`:

```python
from lessweb import Bridge, get_mapping

@get_mapping('/')
async def hello():
    return {'message': 'Hello, world!'}

def main():
    bridge = Bridge()
    bridge.add_route(hello)
    bridge.run_app()

if __name__ == '__main__':
    main()
```

Start the application with the command below, it listens on `http://localhost:8080/` by default.

```
python3 index.py
```

## Setting port

Save the code below in file `config.toml`:

```toml
[bootstrap]
port = 80
```

Then change the code to:

```python
def main():
    bridge = Bridge(config='config.toml')
    bridge.add_route(hello)
    bridge.run_app()
```

Once you run it, you can access `http://localhost/` with your browser.

You can also use environment variables to override the configuration file's contents, e.g. run `BOOTSTRAP_PORT=8081 python3 index.py`, then it listens on `http://localhost:8081`.

## License

Lessweb is offered under the Apache 2 license.

## Source code

The latest developer version is available in a GitHub repository: https://github.com/lessweb/lessweb

## Cookbook
### https://github.com/lessweb/lessweb/wiki

## Cookbook【中文】:
### http://www.lessweb.cn

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "lessweb",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "lessweb, web, web.py, aiohttp",
    "author": null,
    "author_email": "qorzj <goodhorsezxj@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/77/be/cabc75afc49bcbb78d99c6e51fb29c05b4d0a5ef1132f0ee2ca2862e7077/lessweb-1.2.0.tar.gz",
    "platform": null,
    "description": "# lessweb\n>\u300c\u561e\u662fweb\u300d\n\nLessweb is an extremely easy-to-use python web framework with the following goals.\n\n* Simple and efficient: based on the aiohttp library IOC capabilities, native support for configuration loading and logging settings to meet production-level development requirements\n* Pythonic: support for the latest python version and the latest python syntax\n\n## Install lessweb\n\nTo install the latest lessweb for Python 3, please run:\n\n```shell\npip3 install lessweb\n```\n\n## Hello, world!\n\nSave the code below in file `index.py`:\n\n```python\nfrom lessweb import Bridge, get_mapping\n\n@get_mapping('/')\nasync def hello():\n    return {'message': 'Hello, world!'}\n\ndef main():\n    bridge = Bridge()\n    bridge.add_route(hello)\n    bridge.run_app()\n\nif __name__ == '__main__':\n    main()\n```\n\nStart the application with the command below, it listens on `http://localhost:8080/` by default.\n\n```\npython3 index.py\n```\n\n## Setting port\n\nSave the code below in file `config.toml`:\n\n```toml\n[bootstrap]\nport = 80\n```\n\nThen change the code to:\n\n```python\ndef main():\n    bridge = Bridge(config='config.toml')\n    bridge.add_route(hello)\n    bridge.run_app()\n```\n\nOnce you run it, you can access `http://localhost/` with your browser.\n\nYou can also use environment variables to override the configuration file's contents, e.g. run `BOOTSTRAP_PORT=8081 python3 index.py`, then it listens on `http://localhost:8081`.\n\n## License\n\nLessweb is offered under the Apache 2 license.\n\n## Source code\n\nThe latest developer version is available in a GitHub repository: https://github.com/lessweb/lessweb\n\n## Cookbook\n### https://github.com/lessweb/lessweb/wiki\n\n## Cookbook\u3010\u4e2d\u6587\u3011\uff1a\n### http://www.lessweb.cn\n",
    "bugtrack_url": null,
    "license": "Apache 2",
    "summary": "A pythonic web framework",
    "version": "1.2.0",
    "project_urls": null,
    "split_keywords": [
        "lessweb",
        " web",
        " web.py",
        " aiohttp"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "007d0fafe67974027381e40fc87b87635ae367a42e1316402439bf4961dc29d4",
                "md5": "b8bbbb16c2d48d2fca7bc7228d9afff8",
                "sha256": "a51323c660707850260fe73a63b24dd0415954f310d14a4d3982a1ddc1f07427"
            },
            "downloads": -1,
            "filename": "lessweb-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b8bbbb16c2d48d2fca7bc7228d9afff8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 9960,
            "upload_time": "2024-04-07T07:34:15",
            "upload_time_iso_8601": "2024-04-07T07:34:15.783746Z",
            "url": "https://files.pythonhosted.org/packages/00/7d/0fafe67974027381e40fc87b87635ae367a42e1316402439bf4961dc29d4/lessweb-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "77becabc75afc49bcbb78d99c6e51fb29c05b4d0a5ef1132f0ee2ca2862e7077",
                "md5": "5dc84184fa1b203ba7d6556c34384bcd",
                "sha256": "054f9b77bb3d3bd7f9c1b54a091b19f6a4b4c9f82c3a9843d3feda33855f44b2"
            },
            "downloads": -1,
            "filename": "lessweb-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "5dc84184fa1b203ba7d6556c34384bcd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 16540,
            "upload_time": "2024-04-07T07:34:17",
            "upload_time_iso_8601": "2024-04-07T07:34:17.738369Z",
            "url": "https://files.pythonhosted.org/packages/77/be/cabc75afc49bcbb78d99c6e51fb29c05b4d0a5ef1132f0ee2ca2862e7077/lessweb-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-07 07:34:17",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "lessweb"
}
        
Elapsed time: 0.23425s