Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

naja-atra

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

naja-atra

This is a simple http server, use MVC like design.

  • 1.1.4
  • PyPI
  • Socket score

Maintainers
1

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

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc