Skip to main content

The newest contender in Server Gateway interface.

Project description

nsgi

The newest contender in Server Gateway Interface.

Why use this webserver?

This webserver is made with the newest version of asyncio, and sockets, it supports callablle-based interface and also class based. Not enough? Let me tell you how this project works.

How it works

Basically, you create an application, let's say, an API, you run the api with our Runner class and want to visit it, you go to http://development.com (Go to your webserver IP), you will receive a response wich was triggerred from the Response you gave in the code.

It's as simple as it sounds.

Example:

Want an example? Here:

from nsgi.application import AsyncServer
from nsgi.runner import Runner
from nsgi.responses import Response

class Server(AsyncServer):
	def __init__(self) -> None:
		super().__init__()

server = Server()
runner = Runner(server)

@server.get("/", method="GET")
async def index(request):
	response = Response("Hello.")
	return await response() # or return response

runner.run()

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

nsgi-1.0.4.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

nsgi-1.0.4-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file nsgi-1.0.4.tar.gz.

File metadata

  • Download URL: nsgi-1.0.4.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for nsgi-1.0.4.tar.gz
Algorithm Hash digest
SHA256 35eccbd86064537b147b9e5af502abd2d619bae9f31e2cd91aef0a901738e9fd
MD5 8ee578918de1ebf006851485408f4420
BLAKE2b-256 e0d481c6bc24876dbf6aa16d32a470314dd1893ed6fe716e09556db1f26202e6

See more details on using hashes here.

File details

Details for the file nsgi-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: nsgi-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for nsgi-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9b31c7a40bf13e954d8729cea0fa36ad74f9aa50608b8aeb7209aabf7cdfd7b0
MD5 bcc6dd1e8b3b758041cffc368d7097e2
BLAKE2b-256 0e85dfe94a94f05dcca2b69a2a53c54d66f925a283a5aab43f6c7a4fbbb06deb

See more details on using hashes here.

Supported by

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