naja-atra


Namenaja-atra JSON
Version 1.0.1 PyPI version JSON
download
home_pageNone
SummaryThis is a simple http server, use MVC like design.
upload_time2024-04-02 11:28:13
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/d0/6e/544106a32c956f03355ceed8d5d7dff2f139ad42b88b1cd5ac57e39554a2/naja-atra-1.0.1.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.0.1",
    "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": "718ead2c9a32eda2df55a1bb8ec21c1fea021b3d0a024a8f5097eb5198d79255",
                "md5": "6788c26256e448310f0002cc7e2c40be",
                "sha256": "7814a20b9e211df55c63d66e2d62880341e7ef152a94a75a0689471cbdb20f0c"
            },
            "downloads": -1,
            "filename": "naja_atra-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6788c26256e448310f0002cc7e2c40be",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 59161,
            "upload_time": "2024-04-02T11:28:11",
            "upload_time_iso_8601": "2024-04-02T11:28:11.214043Z",
            "url": "https://files.pythonhosted.org/packages/71/8e/ad2c9a32eda2df55a1bb8ec21c1fea021b3d0a024a8f5097eb5198d79255/naja_atra-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d06e544106a32c956f03355ceed8d5d7dff2f139ad42b88b1cd5ac57e39554a2",
                "md5": "681ee3b39cfc53ec94aeccb2be5be54c",
                "sha256": "9c7900675acd37e5e641f2e40883d094710103e326cc9c1a4186d226932b1232"
            },
            "downloads": -1,
            "filename": "naja-atra-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "681ee3b39cfc53ec94aeccb2be5be54c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 48510,
            "upload_time": "2024-04-02T11:28:13",
            "upload_time_iso_8601": "2024-04-02T11:28:13.041335Z",
            "url": "https://files.pythonhosted.org/packages/d0/6e/544106a32c956f03355ceed8d5d7dff2f139ad42b88b1cd5ac57e39554a2/naja-atra-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-02 11:28:13",
    "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: 0.31931s