Skip to main content

HTTP/1.1 server built on one-ring-loop and io_uring

Project description

one-ring-http

HTTP/1.1 server built on one-ring-loop and Linux io_uring.

Part of the one-ring project.

What it provides

  • HTTPServer - TLS-enabled HTTP/1.1 server
  • Router - method + path routing with fallback handlers
  • Request/Response - parsed HTTP requests, serializable responses
  • Static file serving - built-in static file handler

Example

import ssl

from one_ring_http.response import Response
from one_ring_http.router import Router
from one_ring_http.server import HTTPServer
from one_ring_loop import run

ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
ssl_context.load_cert_chain("cert.pem", "key.pem")

def hello(request):
    return Response(status_code=200, body=b"Hello, world!")

router = Router()
router.add("GET", "/", hello)

server = HTTPServer(router=router, host="127.0.0.1", port=8000, ssl_context=ssl_context)
run(server.serve())

Requirements

  • Linux with io_uring support (kernel 6.7+)
  • Python 3.14+

Installation

uv add one-ring-http

License

MIT

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

one_ring_http-0.2.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

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

one_ring_http-0.2.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file one_ring_http-0.2.0.tar.gz.

File metadata

  • Download URL: one_ring_http-0.2.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"25.10","id":"questing","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for one_ring_http-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2b3cb8487c3f61509623561a75a332861052f70654381d3274333bbbffc54c2a
MD5 9db1ee9fbf4b844d46c92acc9b6dabcc
BLAKE2b-256 923cf0b1abe4166ceb9d522605458ebf66615f41044a28afd821bcd1138d0ce1

See more details on using hashes here.

File details

Details for the file one_ring_http-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: one_ring_http-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"25.10","id":"questing","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for one_ring_http-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 472e2f572afd7ff4e27e4348cb9c3fbfcb914afd6381acc24fd5ac30743c5f4c
MD5 258fc39f08f91246fe66e9bbf6582774
BLAKE2b-256 8b9ba326ae4a6da285c5c22c9ae37da8a8e40b4ec6063e99a2f8baf8791b879e

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