Staging: this is not the live site, pydocs.org.
Internet Protocols and Support
Simple HTTP request handler with GET and HEAD commands.
This serves files from the current directory and any of its
subdirectories. The MIME type for files is determined by
calling the .guess_type() method.
The GET and HEAD requests are identical except that the HEAD
request omits the actual contents of the file. Changed in 3.7, 3.9, 3.15 3.7: Added the directory parameter.3.9: The directory parameter accepts a path-like object.3.15: Added extra_response_headers parameter.Members of SimpleHTTPRequestHandler d default_content_type Specifies the Content-Type header value sent when the MIME type cannot be guessed from the file extension of the requested URL. e extensions_map A dictionary mapping suffixes into MIME types, contains custom overrides for the default system mappings. extra_response_headers A sequence of (name, value) pairs containing user-defined extra HTTP response headers to add to each successful HTTP status 200 response. i index_pages Specifies the filenames that are treated as directory index pages. l list_directory Helper to produce a directory listing (absent index.html). s server_version This will be "SimpleHTTP/" + __version__, where __version__ is defined at the module level.
Python docs © Python Software Foundation · Examples CC0 ·
Source on GitHub · Not affiliated with the PSF