diff --git a/html/api.py b/html/api.py new file mode 100644 index 0000000..db21c89 --- /dev/null +++ b/html/api.py @@ -0,0 +1,26 @@ +""" +This is the Amethyst API mode Python interface whatevers. +Docs will follow. +""" + +# Below go imports. +import sys +import os + +if not os.getcwd() in sys.path: + sys.path.append(os.getcwd()) +import pywebsrv + + +class API: + """ + class + """ + + def __init__(self): + # DO NOT USE THIS CLASS FOR PROGRAM, ONLY ON_REQUEST PLEASE!! + # Below go definitions to get things working. + self.build_response = pywebsrv.WebServer.build_binary_response + + def on_request(self, req): + return self.build_response(200, "This is a test", "text/html") diff --git a/html/index.html b/html/index.html index 9e59939..641a1db 100644 --- a/html/index.html +++ b/html/index.html @@ -8,7 +8,7 @@
If you see this page and you're not the server owner, tell them they misconfigured something!
-This server runs Amethyst Alpha Build 0039
+This server runs Amethyst Alpha Build 0048