Skip to main content

A simple web server with websocket support based on starlette and uvicorn

Project description

moonlette

A simple web server with websockets support based on starlette, uvicorn and authlib.

Installation

pip install moonlette

Example usage (http)

from mooonlette.server import Server
server = Server(port=8081, host="localhost")
      
def handler(path, headers, path_parameters, query_parameters, request_body):
    return (200, b"It Worked!", "text/plain", {})

server.attach_handler("GET", "/test", handler)
server.run()

Example usage (websocckets)

Coming soon

Documentation

Coming Soon

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

moonlette-0.0.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

moonlette-0.0.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file moonlette-0.0.1.tar.gz.

File metadata

  • Download URL: moonlette-0.0.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for moonlette-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ad0162aac7b5c10fdf5d3ef30910ddbecf9b992f35946670dd3d5cafc5aecbc5
MD5 13e535365475a80cbfc05bfb54cb66c1
BLAKE2b-256 19e94f1bbef9eacaa615f645befd3bd5b84db01c4ee828369e23753dff495d98

See more details on using hashes here.

File details

Details for the file moonlette-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: moonlette-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for moonlette-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 63ce7e8587b5b550ea1093dff46647f827a39c5416895b6ed005c5f00b69c5d7
MD5 a40c06ab632c7e5a451ca97fa45462fd
BLAKE2b-256 56f7ddfcf3bda11d612a0c865c86ecf1a6436c039c122a3cd82541d29fcea53f

See more details on using hashes here.

Supported by

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