BLM16-MicroServer


NameBLM16-MicroServer JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryA lightweight and flexible webserver.
upload_time2024-01-19 06:04:23
maintainer
docs_urlNone
author
requires_python>=3
licenseMIT License Copyright (c) 2024 Bradley Myers. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords microserver webserver lightweight
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MicroServer

MicroServer is a lightweight Python webserver with minimal overhead and no external dependencies
MicroServer provides complete flexibility by leaving all data processing and templating to the user.

```py
from microserver import MicroServer, Response

server = MicroServer()

# Configures the route / to be handled by the home function.
@server.route('/')
def home():
    data = server.load_view('index.html')
    mime = 'text/html'
    return Response(data, mime)

# Configures all 404 errors to be handled by the e404 function.
@server.errorhandler(404)
def e404():
    data = server.load_view('404.html')
    mime = 'text/html'
    return Response(data, mime)

# Starts the server on the given host and port.
server.start('localhost', 8080)
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "BLM16-MicroServer",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": "",
    "keywords": "microserver,webserver,lightweight",
    "author": "",
    "author_email": "BLM16 <myers.bradley@hotmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/0f/32/9986ff0ab726af9e518368e64eec45df79cacbb386be679669a149baa674/BLM16-MicroServer-1.0.0.tar.gz",
    "platform": null,
    "description": "# MicroServer\n\nMicroServer is a lightweight Python webserver with minimal overhead and no external dependencies\nMicroServer provides complete flexibility by leaving all data processing and templating to the user.\n\n```py\nfrom microserver import MicroServer, Response\n\nserver = MicroServer()\n\n# Configures the route / to be handled by the home function.\n@server.route('/')\ndef home():\n    data = server.load_view('index.html')\n    mime = 'text/html'\n    return Response(data, mime)\n\n# Configures all 404 errors to be handled by the e404 function.\n@server.errorhandler(404)\ndef e404():\n    data = server.load_view('404.html')\n    mime = 'text/html'\n    return Response(data, mime)\n\n# Starts the server on the given host and port.\nserver.start('localhost', 8080)\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Bradley Myers. All rights reserved.  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "A lightweight and flexible webserver.",
    "version": "1.0.0",
    "project_urls": {
        "Changelog": "https://github.com/BLM16/MicroServer/blob/master/CHANGELOG.md",
        "Issues": "https://github.com/BLM16/MicroServer/issues",
        "Repository": "https://github.com/BLM16/MicroServer.git"
    },
    "split_keywords": [
        "microserver",
        "webserver",
        "lightweight"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "328560e9e239de9520fb3664e63a070f3b1533767689b007e30d7ce51998fbc4",
                "md5": "05da7f04aa7642d2bbd21fe7f09927d9",
                "sha256": "ba9bfcabc5e0bafff96eb8de4c06f66d546989582f513adb435df40f8c8ba896"
            },
            "downloads": -1,
            "filename": "BLM16_MicroServer-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "05da7f04aa7642d2bbd21fe7f09927d9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3",
            "size": 6607,
            "upload_time": "2024-01-19T06:04:21",
            "upload_time_iso_8601": "2024-01-19T06:04:21.656776Z",
            "url": "https://files.pythonhosted.org/packages/32/85/60e9e239de9520fb3664e63a070f3b1533767689b007e30d7ce51998fbc4/BLM16_MicroServer-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0f329986ff0ab726af9e518368e64eec45df79cacbb386be679669a149baa674",
                "md5": "114408ac08fa7f148c7fd5ff7b9d8710",
                "sha256": "ef089c6c40bec980920eee0ef8a53ab402ee92c08314d3471878f7e0b8c7e190"
            },
            "downloads": -1,
            "filename": "BLM16-MicroServer-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "114408ac08fa7f148c7fd5ff7b9d8710",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 4574,
            "upload_time": "2024-01-19T06:04:23",
            "upload_time_iso_8601": "2024-01-19T06:04:23.184453Z",
            "url": "https://files.pythonhosted.org/packages/0f/32/9986ff0ab726af9e518368e64eec45df79cacbb386be679669a149baa674/BLM16-MicroServer-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-19 06:04:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "BLM16",
    "github_project": "MicroServer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "blm16-microserver"
}
        
Elapsed time: 2.42950s