Skip to main content

reactor http server

Project description

reactor

A minimal HTTP server implementing the Reactor pattern in Python. Designed for learning event-driven network programming.

This project aims to demonstrate how to implement a Reactor-based HTTP server from scratch in Python.

Core components such as Buffer, HTTP request parser, and HTTP response builder are implemented manually to illustrate event-driven network programming.

Version

2.2.2

install

pip install reactor-server

example:

from reactor_server.http_server.eventloop import EventLoop
from reactor_server.http_server.server import Server

if __name__ == '__main__':
    Server(loop_cls=EventLoop, root="/home/jack/code/python/learn/reactor_server/tests").run()

Reactor-based HTTP Server (Python)

  • Similar to http.server.

  • Implemented a non-blocking HTTP server using the Reactor pattern.

  • Built custom Buffer, Request parser, and Response builder.

  • Implemented static file serving and directory listing.

  • Designed multi-reactor architecture with threadpool.

  • Handled partial read/write and TCP connection lifecycle.

  • Others maybe done in the future?

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

reactor_server-2.3.0.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

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

reactor_server-2.3.0-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

File details

Details for the file reactor_server-2.3.0.tar.gz.

File metadata

  • Download URL: reactor_server-2.3.0.tar.gz
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.2 Linux/6.6.87.1-microsoft-standard-WSL2

File hashes

Hashes for reactor_server-2.3.0.tar.gz
Algorithm Hash digest
SHA256 28206c3ea43368a8310066e786621d502cc5641959afd724f2601603d74f5fd3
MD5 18bc535e34265120afcd24386ea80d46
BLAKE2b-256 94d9453648500eaca298bfba4c80ed399132f5a416ceee935960f84219b1b09c

See more details on using hashes here.

File details

Details for the file reactor_server-2.3.0-py3-none-any.whl.

File metadata

  • Download URL: reactor_server-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 31.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.2 Linux/6.6.87.1-microsoft-standard-WSL2

File hashes

Hashes for reactor_server-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7b4157db681fabe78f1c598baa0060be20ab66eba465e536b7ff503931a23dd2
MD5 05a767e859caf4d29a4d2f997cbec197
BLAKE2b-256 436fc9accd302bfb91f43861ff1442fc105982d8449112a3236ec0fc41ceea28

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