Version 0.3.0

Enhanced multithreading engine, bugs fixed and more!
This commit is contained in:
Bill Gates
2026-08-07 15:06:13 +02:00
parent bd78ab9225
commit 3276224943
8 changed files with 259 additions and 120 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
<h1>Hello from Amethyst!</h1>
<h2>This page confirms Amethyst can read files from your PC or server and serve them to your browser!</h2>
<p>This is a test page, if you aren't the server owner, they might not have finished setting up their site, be patient. If this doesn't go away after a while, tell them they've made an oopsie</p>
<p>This server runs Amethyst build 0080</p>
<p>This server runs Amethyst build 0.3.0-0114-mt-tryout1</p>
</center>
</body>
</html>
+7 -4
View File
@@ -9,10 +9,10 @@ import os
if not os.getcwd() in sys.path:
sys.path.append(os.getcwd())
import pywebsrv
import amethyst
class API:
class PES:
"""
class
"""
@@ -20,7 +20,10 @@ class API:
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
self.build_response = amethyst.WebServer.build_binary_response
self.fh = amethyst.FileHandler("..")
self.rq = amethyst.RequestParser()
self.THREAD_SAFETY: bool = True
def on_request(self, req):
return self.build_response(200, "This is a test", "text/html")
return self.build_response(200, b"Heyhey! This is the default PES script!", "text/html")