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.1.0.tar.gz (9.3 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.1.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: one_ring_http-0.1.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","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.1.0.tar.gz
Algorithm Hash digest
SHA256 38e82a3d0d6e25ad99993f1032bb3ee6c80eec78e18203b6de00260555ee8a9e
MD5 ee9f3b410d62a6aa37edc6d99cfd53f1
BLAKE2b-256 74a15d6e0f59e3b075d6a6f7e9f43eeddf8390702bbab0bb1666981adc08c846

See more details on using hashes here.

File details

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

File metadata

  • Download URL: one_ring_http-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 407a34823e878c5014c0bfbc083e6a6b88d71baba58c81327392c853ff716008
MD5 6e4f711e0a2c58f4079d8532b9cf7d6c
BLAKE2b-256 1a62c8a56a9d4cfddaac7b8fdf03b4726005830affd604591c3f43dc7a6b0e41

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