naja-atra


Namenaja-atra JSON
Version 1.1.4 PyPI version JSON
download
home_pageNone
SummaryThis is a simple http server, use MVC like design.
upload_time2024-11-11 03:45:51
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT License Copyright (c) 2018 Keijack Wu 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 http-server websocket http web web-server
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Naja-Atra

Naja-Atra is a lightweight python web framework. It's designed to make starting a web service easier. It supports both HTTP and WebSocket. 

## Installation

Install and update using [pip](https://pip.pypa.io/en/stable/quickstart/):

```
$ pip install -U naja-atra
```

A Simple Example:

```python
from naja_atra import route

@route('/')
def hello(name: str = 'World'):
    return {'message': f'Hello, {name}!'}
```

To run the app, simply execute the `naja-atra` command:

```
$ python3 -m naja_atra
```

Or, you can run it programmatically:

```python
from naja_atra import route
from naja_atra import server


@route("/")
def hello(name: str = 'World'):
    return {"message": f"Hello {name}"}

def main():
    server.start(host="0.0.0.0", port=9090)

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

## More

* Source Code: [https://github.com/naja-atra/naja-atra](https://github.com/naja-atra/naja-atra)
* Issues Tracker: [https://github.com/naja-atra/naja-atra/issues](https://github.com/naja-atra/naja-atra/issues)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "naja-atra",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "http-server, websocket, http, web, web-server",
    "author": null,
    "author_email": "keijack <keijack.wu@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/f0/ab/0f8be036a219f9f99d4018174b788998719f7f7fb271bbd5749024b16ba9/naja_atra-1.1.4.tar.gz",
    "platform": null,
    "description": "# Naja-Atra\n\nNaja-Atra is a lightweight python web framework. It's designed to make starting a web service easier. It supports both HTTP and WebSocket. \n\n## Installation\n\nInstall and update using [pip](https://pip.pypa.io/en/stable/quickstart/):\n\n```\n$ pip install -U naja-atra\n```\n\nA Simple Example:\n\n```python\nfrom naja_atra import route\n\n@route('/')\ndef hello(name: str = 'World'):\n    return {'message': f'Hello, {name}!'}\n```\n\nTo run the app, simply execute the `naja-atra` command:\n\n```\n$ python3 -m naja_atra\n```\n\nOr, you can run it programmatically:\n\n```python\nfrom naja_atra import route\nfrom naja_atra import server\n\n\n@route(\"/\")\ndef hello(name: str = 'World'):\n    return {\"message\": f\"Hello {name}\"}\n\ndef main():\n    server.start(host=\"0.0.0.0\", port=9090)\n\nif __name__ == \"__main__\":\n    main()\n```\n\n## More\n\n* Source Code: [https://github.com/naja-atra/naja-atra](https://github.com/naja-atra/naja-atra)\n* Issues Tracker: [https://github.com/naja-atra/naja-atra/issues](https://github.com/naja-atra/naja-atra/issues)\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2018 Keijack Wu  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": "This is a simple http server, use MVC like design.",
    "version": "1.1.4",
    "project_urls": {
        "homepage": "https://github.com/naja-atra/naja-atra",
        "repository": "https://github.com/naja-atra/naja-atra"
    },
    "split_keywords": [
        "http-server",
        " websocket",
        " http",
        " web",
        " web-server"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0b1310aa70340f7867a7f54db8594d338a2f2f7ff13b13dce4d079aa7a6926c7",
                "md5": "48eec61ac5d67c9c29cc5c79ae7c8e1e",
                "sha256": "89d596d80952c836d6e65c9b0cd5d51f96663d98ef9fdb64a77be2f0ccbf0c86"
            },
            "downloads": -1,
            "filename": "naja_atra-1.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "48eec61ac5d67c9c29cc5c79ae7c8e1e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 59957,
            "upload_time": "2024-11-11T03:45:48",
            "upload_time_iso_8601": "2024-11-11T03:45:48.700417Z",
            "url": "https://files.pythonhosted.org/packages/0b/13/10aa70340f7867a7f54db8594d338a2f2f7ff13b13dce4d079aa7a6926c7/naja_atra-1.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f0ab0f8be036a219f9f99d4018174b788998719f7f7fb271bbd5749024b16ba9",
                "md5": "b73b7a7d41479ec469d77238810df565",
                "sha256": "70e7b4905379676668f643b47106cce6273759a3080d54c247093fd1e73e760f"
            },
            "downloads": -1,
            "filename": "naja_atra-1.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "b73b7a7d41479ec469d77238810df565",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 45677,
            "upload_time": "2024-11-11T03:45:51",
            "upload_time_iso_8601": "2024-11-11T03:45:51.116083Z",
            "url": "https://files.pythonhosted.org/packages/f0/ab/0f8be036a219f9f99d4018174b788998719f7f7fb271bbd5749024b16ba9/naja_atra-1.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-11 03:45:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "naja-atra",
    "github_project": "naja-atra",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "naja-atra"
}
        
Elapsed time: 3.94114s