Registry / web-framework / httpserver

httpserver

JSON →
library1.1.0pypypi✓ verified 79d ago

Asyncio implementation of an HTTP server. Version 1.1.0 provides a simple, async HTTP server built on asyncio. Release cadence is low; last release was 2023.

pip install httpserver
INSTALL
IMPORT
SIG · HTTPSERVER
H
httpserver
web-frameworkpythonv1.1.0
Install
2.4s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.4s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

run
from httpserver import run
from httpserver import HTTPServer

Creates a simple HTTP server responding with 'Hello, world!' on GET requests.

import os from httpserver import HTTPServer, RequestHandler class HelloHandler(RequestHandler): def do_GET(self): self.send_response(200) self.send_header('Content-type', 'text/plain') self.end_headers() self.wfile.write(b"Hello, world!") server = HTTPServer(('localhost', 8080), HelloHandler) print('Server running on http://localhost:8080') server.serve_forever()
Debug
Known issues
gotchaThe server runs on the event loop; ensure your handler methods are not blocking or use async callbacks.
fix
Make handler methods async or offload blocking calls to executor.
affects: >=1.0.0
deprecatedThe library is minimally maintained. For production, consider aiohttp or sanic.
fix
Evaluate if the library meets long-term needs.
affects: *
breakingIn version 1.1.0, the signature of HTTPServer changed: the first argument is now a tuple (host, port) instead of separate arguments.
fix
Change from HTTPServer('localhost', 8080, ...) to HTTPServer(('localhost', 8080), ...).
affects: <1.1.0
Upgrade
Version history
1.1.0latest on PyPI · released Apr 2, 2015
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
18
Resources
httpserver — pip install httpserver · libregistry