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
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.2.2.tar.gz
(46.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
naja_atra-1.2.2-py3-none-any.whl
(59.8 kB
view details)
File details
Details for the file naja_atra-1.2.2.tar.gz.
File metadata
- Download URL: naja_atra-1.2.2.tar.gz
- Upload date:
- Size: 46.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
411b88f5a651c4de23aefa1ad5f4ba313ed14edc9060799ad8eb55a2b5262a90
|
|
| MD5 |
9a1a8c67e9110e8cb9569c37c1ca5893
|
|
| BLAKE2b-256 |
0bf04fc62d1f2cd793e3afbce0264f2641a929c42b970e96f6ade872fa8809af
|
File details
Details for the file naja_atra-1.2.2-py3-none-any.whl.
File metadata
- Download URL: naja_atra-1.2.2-py3-none-any.whl
- Upload date:
- Size: 59.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d29b7d7c638095eb187f1cfc2412afeedd07eada328d94736eab00ee603314ad
|
|
| MD5 |
7311123890d1785a26d28ca2fe0a5dc8
|
|
| BLAKE2b-256 |
be772f652ce02e1d6f79b563427535ae068dad56175aeff887fd84cc8dbbf06a
|