Skip to main content

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

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.4.tar.gz (45.7 kB view details)

Uploaded Source

Built Distribution

naja_atra-1.1.4-py3-none-any.whl (60.0 kB view details)

Uploaded Python 3

File details

Details for the file naja_atra-1.1.4.tar.gz.

File metadata

  • Download URL: naja_atra-1.1.4.tar.gz
  • Upload date:
  • Size: 45.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for naja_atra-1.1.4.tar.gz
Algorithm Hash digest
SHA256 70e7b4905379676668f643b47106cce6273759a3080d54c247093fd1e73e760f
MD5 b73b7a7d41479ec469d77238810df565
BLAKE2b-256 f0ab0f8be036a219f9f99d4018174b788998719f7f7fb271bbd5749024b16ba9

See more details on using hashes here.

File details

Details for the file naja_atra-1.1.4-py3-none-any.whl.

File metadata

  • Download URL: naja_atra-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 60.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for naja_atra-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 89d596d80952c836d6e65c9b0cd5d51f96663d98ef9fdb64a77be2f0ccbf0c86
MD5 48eec61ac5d67c9c29cc5c79ae7c8e1e
BLAKE2b-256 0b1310aa70340f7867a7f54db8594d338a2f2f7ff13b13dce4d079aa7a6926c7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page