add: basics
This commit is contained in:
commit
9185bec3fe
0
src/ requirements.txt
Normal file
0
src/ requirements.txt
Normal file
BIN
src/__pycache__/currencies.cpython-310.pyc
Normal file
BIN
src/__pycache__/currencies.cpython-310.pyc
Normal file
Binary file not shown.
BIN
src/__pycache__/server.cpython-310.pyc
Normal file
BIN
src/__pycache__/server.cpython-310.pyc
Normal file
Binary file not shown.
3
src/main.py
Normal file
3
src/main.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from server import run
|
||||
|
||||
run()
|
11
src/server.py
Normal file
11
src/server.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
from http.server import BaseHTTPRequestHandler, HTTPServer
|
||||
import json
|
||||
|
||||
def run(server_class=HTTPServer, handler_class=BaseHTTPRequestHandler):
|
||||
server_address = ("", 8000)
|
||||
httpd = server_class(server_address, WeatherHandler)
|
||||
httpd.serve_forever()
|
||||
|
||||
class WeatherHandler(BaseHTTPRequestHandler):
|
||||
def do_GET(self):
|
||||
return self.render(404)
|
0
src/weather.py
Normal file
0
src/weather.py
Normal file
Loading…
Reference in New Issue
Block a user