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.1.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.1-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: one_ring_http-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 148eda6192b27a72f26f777687ddd2249fbe1ed7579d352b5991926ef048555f
MD5 e3a168841620b5118b48e5f48ae8e7cc
BLAKE2b-256 414e5da2a5d36d0ea27cefdb594df820251e39312f1f55dc9e986cd131a8f804

See more details on using hashes here.

File details

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

File metadata

  • Download URL: one_ring_http-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1c0da745dcff367943f8f353e8829ff7e98e2cc6cce8bc420790792b37990b48
MD5 3d98e662488e4e2ff5b674b7b29ec09c
BLAKE2b-256 0a23aafd06538b4f2d031f722d439da65e38182282f2f0ced95ad3c6daae4de8

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