From 4393f39da5b25bd18a04e8c9c7d2045cefaab1a9 Mon Sep 17 00:00:00 2001 From: bryanseah234 Date: Sat, 29 Aug 2020 04:14:32 +0000 Subject: [PATCH] final --- main.py | 3 ++- poetry.lock | 69 +++++++++++++++++++++++++++++++++++++++++++++++++- pyproject.toml | 1 + 3 files changed, 71 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index a14bc9d..9fc677b 100644 --- a/main.py +++ b/main.py @@ -1,10 +1,10 @@ -import os from flask import Flask from flask import render_template, redirect from docs.chess import WebInterface, Board from flask import request from docs.MoveHistory import MoveHistory from copy import copy +from flask import Flask, render_template # app = Flask(__name__ ) @@ -13,6 +13,7 @@ game = Board() history = MoveHistory(10) + @app.route('/') def root(): return render_template('index.html') diff --git a/poetry.lock b/poetry.lock index ac64748..4ffa076 100644 --- a/poetry.lock +++ b/poetry.lock @@ -33,6 +33,18 @@ dev = ["pytest", "coverage", "tox", "sphinx", "pallets-sphinx-themes", "sphinxco docs = ["sphinx", "pallets-sphinx-themes", "sphinxcontrib-log-cabinet", "sphinx-issues"] dotenv = ["python-dotenv"] +[[package]] +category = "main" +description = "Socket.IO integration for Flask applications" +name = "flask-socketio" +optional = false +python-versions = "*" +version = "4.3.1" + +[package.dependencies] +Flask = ">=0.9" +python-socketio = ">=4.3.0" + [[package]] category = "main" description = "Various helpers to pass data to untrusted environments and back." @@ -71,6 +83,45 @@ optional = false python-versions = ">=3.6" version = "0.31.4" +[[package]] +category = "main" +description = "Engine.IO server" +name = "python-engineio" +optional = false +python-versions = "*" +version = "3.13.2" + +[package.dependencies] +six = ">=1.9.0" + +[package.extras] +asyncio_client = ["aiohttp (>=3.4)"] +client = ["requests (>=2.21.0)", "websocket-client (>=0.54.0)"] + +[[package]] +category = "main" +description = "Socket.IO server" +name = "python-socketio" +optional = false +python-versions = "*" +version = "4.6.0" + +[package.dependencies] +python-engineio = ">=3.13.0" +six = ">=1.9.0" + +[package.extras] +asyncio_client = ["aiohttp (>=3.4)", "websockets (>=7.0)"] +client = ["requests (>=2.21.0)", "websocket-client (>=0.54.0)"] + +[[package]] +category = "main" +description = "Python 2 and 3 compatibility utilities" +name = "six" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +version = "1.15.0" + [[package]] category = "main" description = "The comprehensive WSGI web application library." @@ -84,7 +135,7 @@ dev = ["pytest", "pytest-timeout", "coverage", "tox", "sphinx", "pallets-sphinx- watchdog = ["watchdog"] [metadata] -content-hash = "f0fe08a3c4cf0dc2dafe7e4a0dbb1bf7bd4c7ea16852932e74fc58b95753c1ab" +content-hash = "8264faeedb37a26cd32123d0b66770a24abe27a64e0405efee7348cf3f92b143" python-versions = "^3.8" [metadata.files] @@ -100,6 +151,10 @@ flask = [ {file = "Flask-1.1.2-py2.py3-none-any.whl", hash = "sha256:8a4fdd8936eba2512e9c85df320a37e694c93945b33ef33c89946a340a238557"}, {file = "Flask-1.1.2.tar.gz", hash = "sha256:4efa1ae2d7c9865af48986de8aeb8504bf32c7f3d6fdc9353d34b21f4b127060"}, ] +flask-socketio = [ + {file = "Flask-SocketIO-4.3.1.tar.gz", hash = "sha256:36c1d5765010d1f4e4f05b4cc9c20c289d9dc70698c88d1addd0afcfedc5b062"}, + {file = "Flask_SocketIO-4.3.1-py2.py3-none-any.whl", hash = "sha256:3668675bf7763c5b5f56689d439f07356e89c0a52e0c9e9cd3cc08563c07b252"}, +] itsdangerous = [ {file = "itsdangerous-1.1.0-py2.py3-none-any.whl", hash = "sha256:b12271b2047cb23eeb98c8b5622e2e5c5e9abd9784a153e9d8ef9cb4dd09d749"}, {file = "itsdangerous-1.1.0.tar.gz", hash = "sha256:321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19"}, @@ -147,6 +202,18 @@ python-chess = [ {file = "python-chess-0.31.4.tar.gz", hash = "sha256:1fb46b9fd7919332fcfe34df7284e58e9adb9579ef44f26ed9e3343ce9b30d07"}, {file = "python_chess-0.31.4-py3-none-any.whl", hash = "sha256:ce9e88e82cf9dcf131b44a04ee8be4891b411e2fee54f5389df27289dae32be4"}, ] +python-engineio = [ + {file = "python-engineio-3.13.2.tar.gz", hash = "sha256:36b33c6aa702d9b6a7f527eec6387a2da1a9a24484ec2f086d76576413cef04b"}, + {file = "python_engineio-3.13.2-py2.py3-none-any.whl", hash = "sha256:cfded18156862f94544a9f8ef37f56727df731c8552d7023f5afee8369be2db6"}, +] +python-socketio = [ + {file = "python-socketio-4.6.0.tar.gz", hash = "sha256:358d8fbbc029c4538ea25bcaa283e47f375be0017fcba829de8a3a731c9df25a"}, + {file = "python_socketio-4.6.0-py2.py3-none-any.whl", hash = "sha256:d437f797c44b6efba2f201867cf02b8c96b97dff26d4e4281ac08b45817cd522"}, +] +six = [ + {file = "six-1.15.0-py2.py3-none-any.whl", hash = "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced"}, + {file = "six-1.15.0.tar.gz", hash = "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259"}, +] werkzeug = [ {file = "Werkzeug-1.0.1-py2.py3-none-any.whl", hash = "sha256:2de2a5db0baeae7b2d2664949077c2ac63fbd16d98da0ff71837f7d1dea3fd43"}, {file = "Werkzeug-1.0.1.tar.gz", hash = "sha256:6c80b1e5ad3665290ea39320b91e1be1e0d5f60652b964a3070216de83d2e47c"}, diff --git a/pyproject.toml b/pyproject.toml index c8cd0a5..c208008 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,6 +9,7 @@ python = "^3.8" flask = "^1.1.2" python-chess = "^0.31.4" fake-factory = "^9999.9.9" +flask-socketio = "^4.3.1" [tool.poetry.dev-dependencies]