from abc import abstractmethod from http.server import BaseHTTPRequestHandler, HTTPServer class MyHandler(BaseHTTPRequestHandler): @abstractmethod def do_GET(self): pass @abstractmethod def do_POST(self): pass