Skip to content

Instantly share code, notes, and snippets.

View ZeppLu's full-sized avatar

Zepp ZeppLu

  • Beijing, China
View GitHub Profile
@ZeppLu
ZeppLu / serve_http.py
Last active May 16, 2024 21:25
Simple Python HTTP Server with multi-threading, partial-content, basic authentication and IPv6 support
#!/usr/bin/env python3
# Standard library imports.
from socketserver import ThreadingMixIn
from http.server import HTTPServer, SimpleHTTPRequestHandler
import sys
import json
import os
from os.path import (join, exists, dirname, abspath, isabs, sep, splitext,
isdir, basename, expanduser, split, splitdrive)