This is a simple http server, use MVC like design.
Project description
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:
$ pip install -U naja-atra
A Simple Example:
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:
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
- Issues Tracker: https://github.com/naja-atra/naja-atra/issues
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
naja_atra-1.1.3.tar.gz
(45.7 kB
view details)
Built Distribution
naja_atra-1.1.3-py3-none-any.whl
(59.9 kB
view details)
File details
Details for the file naja_atra-1.1.3.tar.gz
.
File metadata
- Download URL: naja_atra-1.1.3.tar.gz
- Upload date:
- Size: 45.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 525b1112d83fca99209aa41b116f59afb3351d5b81e5b2ad82fcca0d8aed27ff |
|
MD5 | adc28aa5584df2a6e6bdb9849c8353c0 |
|
BLAKE2b-256 | 25ac78b07fa8d5c29e6f67d0e65e3cea8e3a5fd5f94e5f372f6decf3c919e5b5 |
File details
Details for the file naja_atra-1.1.3-py3-none-any.whl
.
File metadata
- Download URL: naja_atra-1.1.3-py3-none-any.whl
- Upload date:
- Size: 59.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a0849927c51bcb310771b0ce739abf07050ef662f9aa6eb00e7c630dce2091d |
|
MD5 | ea6217893d4daddfb46b4f2fb4ef61e8 |
|
BLAKE2b-256 | 9c42547aaa0b2eb2877e5eec1855daf36970991b8b2cb4dd2c4d56b30a641901 |