http.server.SimpleHTTPRequestHandler()
http.server.SimpleHTTPRequestHandler() is a Python function in the HTTP Server Module category. A simple request handler that serves files from the current directory. The syntax is http.server.SimpleHTTPRequestHandler(request, client_address, server). Returns: Handler class. A typical example: python -m http.server 8000 # Quick file server. A close sibling is http.server.HTTPServer(), which creates an HTTP server that listens for connections and dispatches to handlers. A close sibling is http.server.BaseHTTPRequestHandler(), which base class for custom HTTP request handlers. More about this category: Simple HTTP server — HTTPServer, BaseHTTPRequestHandler, SimpleHTTPRequestHandler. Related HTTP Server Module entries: http.server.HTTPServer(), http.server.BaseHTTPRequestHandler(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details. You can try http.server.SimpleHTTPRequestHandler() immediately in the Python playground, look up unfamiliar terms in the glossary, or return to the Python Reference homepage.