From 8988f12a148f84d996762612f69772760a4093b8 Mon Sep 17 00:00:00 2001 From: Wojciech Janota Date: Fri, 7 Oct 2022 13:56:49 +0200 Subject: [PATCH] Skeleton --- .gitignore | 1 + fleetcontrol | 5 +++++ network/__init__.py | 0 network/communication.py | 13 +++++++++++++ utils/__init__.py | 0 5 files changed, 19 insertions(+) create mode 100644 .gitignore create mode 100644 fleetcontrol create mode 100644 network/__init__.py create mode 100644 network/communication.py create mode 100644 utils/__init__.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2faba4a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.env/** diff --git a/fleetcontrol b/fleetcontrol new file mode 100644 index 0000000..70a980a --- /dev/null +++ b/fleetcontrol @@ -0,0 +1,5 @@ +#!/usr/bin/python3 + +import flask + +# vi: ft=python diff --git a/network/__init__.py b/network/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/network/communication.py b/network/communication.py new file mode 100644 index 0000000..18bc14a --- /dev/null +++ b/network/communication.py @@ -0,0 +1,13 @@ +from flask import Flask + + +class Server(host, port, name, access_password, version): + app = Flask(self.name) + + @app.route("/") + def basic_server_data(self): + return {"server_name": self.name, "server_version": self.version, "host": self.host} + + @app.route("/client/register") + def register_new_client_to_database(self): + # TODO: implement diff --git a/utils/__init__.py b/utils/__init__.py new file mode 100644 index 0000000..e69de29