From e58989fa18f2812c10e521868f33a085c4f4116d Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Wed, 21 Feb 2024 15:00:21 -0800 Subject: [PATCH] feat: break through the static --- app/__pycache__/server.cpython-312.pyc | Bin 629 -> 7098 bytes app/server.py | 181 +++++++++++++++- client/index.html | 4 +- client/package-lock.json | 159 ++++++++++++++ client/package.json | 5 +- client/svelte.config.js | 7 + client/vite.config.ts | 3 + poetry.lock | 273 ++++++++++++++++++++++++- pyproject.toml | 26 ++- 9 files changed, 641 insertions(+), 17 deletions(-) diff --git a/app/__pycache__/server.cpython-312.pyc b/app/__pycache__/server.cpython-312.pyc index 6d222e6b97f59e12bc230ccd0d88afcb29fd0dfe..4899fffa7954d48b8a6e551516e9bca62e149453 100644 GIT binary patch literal 7098 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 literal 629 zcmZ8e&1+LZ5TE^cFR5wlA%!-cwfYXaPy{a`o{W@Igz6=i$7^@hChsHcd#@!uloZ8A z5ZYUN>{a4l;J@HS42rA>ie7q)okNfyNeB^X5`sPrX_Hb=M6m%mM>e_QtxA!8VdX!B0QNd8>NxyK?!>=Kjv> zoulBmHk`ROtSo%w3mVsD%Dx{38?o;{#z{!EmOt~##(9b((fCPSn!w^9Qoe7PWi*aX z@=Tra7^d@BPazTuYFyfB`EHcRJXH7eti9sY(q*egj1cl2=DtDor(5Yie3A6n55o8A wyY>E^A*ubLgj^ppptB?NMlSH_{`MzU|H?~yjorq<)n4N>pBpjYSI*e}0`1X;OaK4? diff --git a/app/server.py b/app/server.py index 285d2d9..093709a 100644 --- a/app/server.py +++ b/app/server.py @@ -1,11 +1,178 @@ -from flask import Flask -import random +"""principal routes lie here.""" -app = Flask(__name__) +import json +import logging +import signal +import sys +from threading import Thread +from time import sleep + +import ntcore +import waitress +from flask import Flask, render_template, send_from_directory +from flask_socketio import SocketIO, emit +from ntcore import util + + +def signal_handler(_signal: int, _frame) -> None: + """End on ctrl c.""" + sys.exit(0) + + +signal.signal(signal.SIGINT, signal_handler) + + +# initialize flask app and socketio +app = Flask(__name__, static_folder="dist") +socketio = SocketIO(app) + +inst = ntcore.NetworkTableInstance.getDefault() +table = inst.getTable("SmartDashboard") +inst.startClient4("client") +inst.setServerTeam(team=1280) +inst.startDSClient() +data = {} + +log = logging.getLogger("werkzeug") +log.setLevel(logging.ERROR) + +ntcore_log = logging.getLogger("ntcore") +ntcore_log.disabled = True + +REFRESH_RATE = 1 # measured in Hz +SEND_TELEMETRY = False + + +def sub_num(name: str) -> None: + """Subscribe to a double topic.""" + sub = table.getDoubleTopic(name).subscribe(-999) + data[name] = sub + + +def sub_str(name: str) -> None: + """Subscribe to a string topic.""" + sub = table.getStringTopic(name).subscribe("-999") + data[name] = sub + + +def sub_bool(name: str) -> None: + """Subscribe to a boolean topic.""" + sub = table.getBooleanTopic(name).subscribe(defaultValue=False) + data[name] = sub + + +def serialize(obj: dict) -> str: + """Serialize telemetry data to static JSON.""" + static = {} + for key, sub in obj.items(): + static[key] = sub.get() + + return json.dumps(static) + + +@app.route("/set//") +def choose(key: str, selection: str) -> str: + """Change sendable chooser.""" + chooser_control = util.ChooserControl(key, inst=inst) + chooser_control.setSelected(selection) + return "Sent" + + +# Route for serving dynamic content (all files within dist/) +@app.route("/") +def serve_file(path): + return send_from_directory("dist", path) + + +# Special route for the root to serve index.html +@app.route("/") +def serve_index(): + return send_from_directory("dist", "index.html") + + +def start(**server_kwargs: dict) -> None: + """Start the app.""" + global app + app = server_kwargs.pop("app", None) + server_kwargs.pop("debug", None) + + waitress.serve(app, **server_kwargs) + + +def stop_telemetry() -> None: + """Stop sending telemetry.""" + global SEND_TELEMETRY + SEND_TELEMETRY = False + + +@socketio.on("connect") +def connect() -> None: + """Handle client connection.""" + + +@socketio.on("request_data") +def request(obj: dict) -> None: + """Handle client telemetry request. + + Expects JSON object with `refresh_rate` value in Hz. + """ + global REFRESH_RATE, SEND_TELEMETRY + try: + REFRESH_RATE = obj["refresh_rate"] + except KeyError: + REFRESH_RATE = 1 + SEND_TELEMETRY = True + + +@socketio.on("stop_data") +def stopped() -> None: + """Stop sending telemetry.""" + stop_telemetry() + + +@socketio.on("disconnect") +def disconnect() -> None: + """Handle client disconnection.""" + stop_telemetry() + + +@socketio.on("subscribe") +def subscribe(obj: dict) -> None: + """Handle client subscription request. + + Expects JSON object with list of topics, + keys pertaining to data type, + values pertaining to array of topic names. + """ + for item in obj["doubles"]: + sub_num(item) + for item in obj["strings"]: + sub_str(item) + for item in obj["booleans"]: + sub_bool(item) + emit("subscribed") + + +def telemetry() -> None: + """Periodically sends updated telemetry to client asynchronously. + + This function is meant to run in a separate thread, + DO NOT DIRECTLY CALL IT FROM THE MAIN THREAD. + """ + while True: + if SEND_TELEMETRY: + # using `socketio.emit` instead of `emit` due to async thread + socketio.emit("telemetry_data", serialize(data)) + + sleep(1 / REFRESH_RATE) + + +# start the periodic thread that handles telemetry requests +thread = Thread(target=telemetry) +thread.daemon = True +thread.start() -@app.route("/rand") -def hello(): - return str(random.randint(0, 100)) if __name__ == "__main__": - app.run(debug=True) + # run app with socketio + socketio.run(app, "localhost", 1280) diff --git a/client/index.html b/client/index.html index b6c5f0a..7123357 100644 --- a/client/index.html +++ b/client/index.html @@ -1,10 +1,10 @@ - + - Vite + Svelte + TS + Jankboard
diff --git a/client/package-lock.json b/client/package-lock.json index 2222bdf..2dd59fe 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -8,6 +8,7 @@ "name": "-client", "version": "0.0.0", "devDependencies": { + "@sveltejs/adapter-static": "^3.0.1", "@sveltejs/vite-plugin-svelte": "^3.0.2", "@tsconfig/svelte": "^5.0.2", "autoprefixer": "^10.4.17", @@ -523,6 +524,13 @@ "node": ">=14" } }, + "node_modules/@polka/url": { + "version": "1.0.0-next.24", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.24.tgz", + "integrity": "sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==", + "dev": true, + "peer": true + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.12.0.tgz", @@ -692,6 +700,48 @@ "win32" ] }, + "node_modules/@sveltejs/adapter-static": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sveltejs/adapter-static/-/adapter-static-3.0.1.tgz", + "integrity": "sha512-6lMvf7xYEJ+oGeR5L8DFJJrowkefTK6ZgA4JiMqoClMkKq0s6yvsd3FZfCFvX1fQ0tpCD7fkuRVHsnUVgsHyNg==", + "dev": true, + "peerDependencies": { + "@sveltejs/kit": "^2.0.0" + } + }, + "node_modules/@sveltejs/kit": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.5.0.tgz", + "integrity": "sha512-1uyXvzC2Lu1FZa30T4y5jUAC21R309ZMRG0TPt+PPPbNUoDpy8zSmSNVWYaBWxYDqLGQ5oPNWvjvvF2IjJ1jmA==", + "dev": true, + "hasInstallScript": true, + "peer": true, + "dependencies": { + "@types/cookie": "^0.6.0", + "cookie": "^0.6.0", + "devalue": "^4.3.2", + "esm-env": "^1.0.0", + "import-meta-resolve": "^4.0.0", + "kleur": "^4.1.5", + "magic-string": "^0.30.5", + "mrmime": "^2.0.0", + "sade": "^1.8.1", + "set-cookie-parser": "^2.6.0", + "sirv": "^2.0.4", + "tiny-glob": "^0.2.9" + }, + "bin": { + "svelte-kit": "svelte-kit.js" + }, + "engines": { + "node": ">=18.13" + }, + "peerDependencies": { + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "svelte": "^4.0.0 || ^5.0.0-next.0", + "vite": "^5.0.3" + } + }, "node_modules/@sveltejs/vite-plugin-svelte": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-3.0.2.tgz", @@ -737,6 +787,13 @@ "integrity": "sha512-BRbo1fOtyVbhfLyuCWw6wAWp+U8UQle+ZXu84MYYWzYSEB28dyfnRBIE99eoG+qdAC0po6L2ScIEivcT07UaMA==", "dev": true }, + "node_modules/@types/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==", + "dev": true, + "peer": true + }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", @@ -1051,6 +1108,16 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -1134,6 +1201,13 @@ "node": ">=8" } }, + "node_modules/devalue": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-4.3.2.tgz", + "integrity": "sha512-KqFl6pOgOW+Y6wJgu80rHpo2/3H07vr8ntR9rkkFIRETewbf5GaYYcakYfiKz89K+sLsuPkQIZaXDMjUObZwWg==", + "dev": true, + "peer": true + }, "node_modules/didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", @@ -1217,6 +1291,13 @@ "node": ">=6" } }, + "node_modules/esm-env": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.0.0.tgz", + "integrity": "sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==", + "dev": true, + "peer": true + }, "node_modules/estree-walker": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", @@ -1353,6 +1434,20 @@ "node": ">= 6" } }, + "node_modules/globalyzer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", + "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==", + "dev": true, + "peer": true + }, + "node_modules/globrex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", + "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", + "dev": true, + "peer": true + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -1387,6 +1482,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/import-meta-resolve": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.0.0.tgz", + "integrity": "sha512-okYUR7ZQPH+efeuMJGlq4f8ubUgO50kByRPyt/Cy1Io4PSRsPjxME+YlVaCOx+NIToW7hCsZNFJyTPFFKepRSA==", + "dev": true, + "peer": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -1647,6 +1753,16 @@ "node": ">=4" } }, + "node_modules/mrmime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", + "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=10" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -2149,6 +2265,13 @@ "rimraf": "^2.5.2" } }, + "node_modules/set-cookie-parser": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz", + "integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==", + "dev": true, + "peer": true + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -2182,6 +2305,21 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/sirv": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", + "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", + "dev": true, + "peer": true, + "dependencies": { + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/sorcery": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/sorcery/-/sorcery-0.11.0.tgz", @@ -2586,6 +2724,17 @@ "node": ">=0.8" } }, + "node_modules/tiny-glob": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", + "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==", + "dev": true, + "peer": true, + "dependencies": { + "globalyzer": "0.1.0", + "globrex": "^0.1.2" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -2598,6 +2747,16 @@ "node": ">=8.0" } }, + "node_modules/totalist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", + "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/ts-interface-checker": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", diff --git a/client/package.json b/client/package.json index e6dcba0..74ad392 100644 --- a/client/package.json +++ b/client/package.json @@ -4,12 +4,13 @@ "version": "0.0.0", "type": "module", "scripts": { - "dev": "vite", - "build": "vite build", + "dev": "vite build --watch --emptyOutDir", + "build": "vite build --emptyOutDir", "preview": "vite preview", "check": "svelte-check --tsconfig ./tsconfig.json" }, "devDependencies": { + "@sveltejs/adapter-static": "^3.0.1", "@sveltejs/vite-plugin-svelte": "^3.0.2", "@tsconfig/svelte": "^5.0.2", "autoprefixer": "^10.4.17", diff --git a/client/svelte.config.js b/client/svelte.config.js index b0683fd..91881a2 100644 --- a/client/svelte.config.js +++ b/client/svelte.config.js @@ -1,7 +1,14 @@ import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' +import adapter from '@sveltejs/adapter-static' export default { // Consult https://svelte.dev/docs#compile-time-svelte-preprocess // for more information about preprocessors preprocess: vitePreprocess(), + adapter: adapter({ + pages: 'build', + assets: 'build', + fallback: null, + precompress: false, + }), } diff --git a/client/vite.config.ts b/client/vite.config.ts index d701969..9cd2d2a 100644 --- a/client/vite.config.ts +++ b/client/vite.config.ts @@ -4,4 +4,7 @@ import { svelte } from '@sveltejs/vite-plugin-svelte' // https://vitejs.dev/config/ export default defineConfig({ plugins: [svelte()], + build: { + outDir: '../app/dist', + }, }) diff --git a/poetry.lock b/poetry.lock index 57b941f..f66a2ee 100644 --- a/poetry.lock +++ b/poetry.lock @@ -47,6 +47,44 @@ files = [ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] +[[package]] +name = "dnspython" +version = "2.6.1" +description = "DNS toolkit" +optional = false +python-versions = ">=3.8" +files = [ + {file = "dnspython-2.6.1-py3-none-any.whl", hash = "sha256:5ef3b9680161f6fa89daf8ad451b5f1a33b18ae8a1c6778cdf4b43f08c0a6e50"}, + {file = "dnspython-2.6.1.tar.gz", hash = "sha256:e8f0f9c23a7b7cb99ded64e6c3a6f3e701d78f50c55e002b839dea7225cff7cc"}, +] + +[package.extras] +dev = ["black (>=23.1.0)", "coverage (>=7.0)", "flake8 (>=7)", "mypy (>=1.8)", "pylint (>=3)", "pytest (>=7.4)", "pytest-cov (>=4.1.0)", "sphinx (>=7.2.0)", "twine (>=4.0.0)", "wheel (>=0.42.0)"] +dnssec = ["cryptography (>=41)"] +doh = ["h2 (>=4.1.0)", "httpcore (>=1.0.0)", "httpx (>=0.26.0)"] +doq = ["aioquic (>=0.9.25)"] +idna = ["idna (>=3.6)"] +trio = ["trio (>=0.23)"] +wmi = ["wmi (>=1.5.1)"] + +[[package]] +name = "eventlet" +version = "0.34.3" +description = "Highly concurrent networking library" +optional = false +python-versions = ">=3.7" +files = [ + {file = "eventlet-0.34.3-py3-none-any.whl", hash = "sha256:3093f2822ce2f40792bf9aa7eb8920fe3b90db785d3bea7640c50412969dcfd7"}, + {file = "eventlet-0.34.3.tar.gz", hash = "sha256:ed2d28a64414a001894b3baf5b650f2c9596b00d57f57d4d7a38f9d3d0c252e8"}, +] + +[package.dependencies] +dnspython = ">=1.15.0" +greenlet = ">=1.0" + +[package.extras] +dev = ["black", "build", "commitizen", "isort", "pip-tools", "pre-commit", "twine"] + [[package]] name = "flask" version = "3.0.2" @@ -87,6 +125,91 @@ python-socketio = ">=5.0.2" [package.extras] docs = ["sphinx"] +[[package]] +name = "flaskwebgui" +version = "1.0.9" +description = "Create desktop applications with Flask/Django/FastAPI!" +optional = false +python-versions = "*" +files = [ + {file = "flaskwebgui-1.0.9-py3-none-any.whl", hash = "sha256:54b62eb08a7eab37724a220acf3f38ec023be45592751a657cf0b689a41d62c6"}, + {file = "flaskwebgui-1.0.9.tar.gz", hash = "sha256:435857d652c1af5aacc62a647f63e88a9a583405e5ef3169c1ed6501cc22ba4f"}, +] + +[package.dependencies] +psutil = ">=5.9,<6.0" + +[[package]] +name = "greenlet" +version = "3.0.3" +description = "Lightweight in-process concurrent programming" +optional = false +python-versions = ">=3.7" +files = [ + {file = "greenlet-3.0.3-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:9da2bd29ed9e4f15955dd1595ad7bc9320308a3b766ef7f837e23ad4b4aac31a"}, + {file = "greenlet-3.0.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d353cadd6083fdb056bb46ed07e4340b0869c305c8ca54ef9da3421acbdf6881"}, + {file = "greenlet-3.0.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dca1e2f3ca00b84a396bc1bce13dd21f680f035314d2379c4160c98153b2059b"}, + {file = "greenlet-3.0.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3ed7fb269f15dc662787f4119ec300ad0702fa1b19d2135a37c2c4de6fadfd4a"}, + {file = "greenlet-3.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd4f49ae60e10adbc94b45c0b5e6a179acc1736cf7a90160b404076ee283cf83"}, + {file = "greenlet-3.0.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:73a411ef564e0e097dbe7e866bb2dda0f027e072b04da387282b02c308807405"}, + {file = "greenlet-3.0.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:7f362975f2d179f9e26928c5b517524e89dd48530a0202570d55ad6ca5d8a56f"}, + {file = "greenlet-3.0.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:649dde7de1a5eceb258f9cb00bdf50e978c9db1b996964cd80703614c86495eb"}, + {file = "greenlet-3.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:68834da854554926fbedd38c76e60c4a2e3198c6fbed520b106a8986445caaf9"}, + {file = "greenlet-3.0.3-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:b1b5667cced97081bf57b8fa1d6bfca67814b0afd38208d52538316e9422fc61"}, + {file = "greenlet-3.0.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:52f59dd9c96ad2fc0d5724107444f76eb20aaccb675bf825df6435acb7703559"}, + {file = "greenlet-3.0.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:afaff6cf5200befd5cec055b07d1c0a5a06c040fe5ad148abcd11ba6ab9b114e"}, + {file = "greenlet-3.0.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fe754d231288e1e64323cfad462fcee8f0288654c10bdf4f603a39ed923bef33"}, + {file = "greenlet-3.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2797aa5aedac23af156bbb5a6aa2cd3427ada2972c828244eb7d1b9255846379"}, + {file = "greenlet-3.0.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b7f009caad047246ed379e1c4dbcb8b020f0a390667ea74d2387be2998f58a22"}, + {file = "greenlet-3.0.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:c5e1536de2aad7bf62e27baf79225d0d64360d4168cf2e6becb91baf1ed074f3"}, + {file = "greenlet-3.0.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:894393ce10ceac937e56ec00bb71c4c2f8209ad516e96033e4b3b1de270e200d"}, + {file = "greenlet-3.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:1ea188d4f49089fc6fb283845ab18a2518d279c7cd9da1065d7a84e991748728"}, + {file = "greenlet-3.0.3-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:70fb482fdf2c707765ab5f0b6655e9cfcf3780d8d87355a063547b41177599be"}, + {file = "greenlet-3.0.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d4d1ac74f5c0c0524e4a24335350edad7e5f03b9532da7ea4d3c54d527784f2e"}, + {file = "greenlet-3.0.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:149e94a2dd82d19838fe4b2259f1b6b9957d5ba1b25640d2380bea9c5df37676"}, + {file = "greenlet-3.0.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:15d79dd26056573940fcb8c7413d84118086f2ec1a8acdfa854631084393efcc"}, + {file = "greenlet-3.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:881b7db1ebff4ba09aaaeae6aa491daeb226c8150fc20e836ad00041bcb11230"}, + {file = "greenlet-3.0.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fcd2469d6a2cf298f198f0487e0a5b1a47a42ca0fa4dfd1b6862c999f018ebbf"}, + {file = "greenlet-3.0.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:1f672519db1796ca0d8753f9e78ec02355e862d0998193038c7073045899f305"}, + {file = "greenlet-3.0.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:2516a9957eed41dd8f1ec0c604f1cdc86758b587d964668b5b196a9db5bfcde6"}, + {file = "greenlet-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:bba5387a6975598857d86de9eac14210a49d554a77eb8261cc68b7d082f78ce2"}, + {file = "greenlet-3.0.3-cp37-cp37m-macosx_11_0_universal2.whl", hash = "sha256:5b51e85cb5ceda94e79d019ed36b35386e8c37d22f07d6a751cb659b180d5274"}, + {file = "greenlet-3.0.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:daf3cb43b7cf2ba96d614252ce1684c1bccee6b2183a01328c98d36fcd7d5cb0"}, + {file = "greenlet-3.0.3-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:99bf650dc5d69546e076f413a87481ee1d2d09aaaaaca058c9251b6d8c14783f"}, + {file = "greenlet-3.0.3-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2dd6e660effd852586b6a8478a1d244b8dc90ab5b1321751d2ea15deb49ed414"}, + {file = "greenlet-3.0.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e3391d1e16e2a5a1507d83e4a8b100f4ee626e8eca43cf2cadb543de69827c4c"}, + {file = "greenlet-3.0.3-cp37-cp37m-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e1f145462f1fa6e4a4ae3c0f782e580ce44d57c8f2c7aae1b6fa88c0b2efdb41"}, + {file = "greenlet-3.0.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1a7191e42732df52cb5f39d3527217e7ab73cae2cb3694d241e18f53d84ea9a7"}, + {file = "greenlet-3.0.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:0448abc479fab28b00cb472d278828b3ccca164531daab4e970a0458786055d6"}, + {file = "greenlet-3.0.3-cp37-cp37m-win32.whl", hash = "sha256:b542be2440edc2d48547b5923c408cbe0fc94afb9f18741faa6ae970dbcb9b6d"}, + {file = "greenlet-3.0.3-cp37-cp37m-win_amd64.whl", hash = "sha256:01bc7ea167cf943b4c802068e178bbf70ae2e8c080467070d01bfa02f337ee67"}, + {file = "greenlet-3.0.3-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:1996cb9306c8595335bb157d133daf5cf9f693ef413e7673cb07e3e5871379ca"}, + {file = "greenlet-3.0.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3ddc0f794e6ad661e321caa8d2f0a55ce01213c74722587256fb6566049a8b04"}, + {file = "greenlet-3.0.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c9db1c18f0eaad2f804728c67d6c610778456e3e1cc4ab4bbd5eeb8e6053c6fc"}, + {file = "greenlet-3.0.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7170375bcc99f1a2fbd9c306f5be8764eaf3ac6b5cb968862cad4c7057756506"}, + {file = "greenlet-3.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b66c9c1e7ccabad3a7d037b2bcb740122a7b17a53734b7d72a344ce39882a1b"}, + {file = "greenlet-3.0.3-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:098d86f528c855ead3479afe84b49242e174ed262456c342d70fc7f972bc13c4"}, + {file = "greenlet-3.0.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:81bb9c6d52e8321f09c3d165b2a78c680506d9af285bfccbad9fb7ad5a5da3e5"}, + {file = "greenlet-3.0.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:fd096eb7ffef17c456cfa587523c5f92321ae02427ff955bebe9e3c63bc9f0da"}, + {file = "greenlet-3.0.3-cp38-cp38-win32.whl", hash = "sha256:d46677c85c5ba00a9cb6f7a00b2bfa6f812192d2c9f7d9c4f6a55b60216712f3"}, + {file = "greenlet-3.0.3-cp38-cp38-win_amd64.whl", hash = "sha256:419b386f84949bf0e7c73e6032e3457b82a787c1ab4a0e43732898a761cc9dbf"}, + {file = "greenlet-3.0.3-cp39-cp39-macosx_11_0_universal2.whl", hash = "sha256:da70d4d51c8b306bb7a031d5cff6cc25ad253affe89b70352af5f1cb68e74b53"}, + {file = "greenlet-3.0.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:086152f8fbc5955df88382e8a75984e2bb1c892ad2e3c80a2508954e52295257"}, + {file = "greenlet-3.0.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d73a9fe764d77f87f8ec26a0c85144d6a951a6c438dfe50487df5595c6373eac"}, + {file = "greenlet-3.0.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b7dcbe92cc99f08c8dd11f930de4d99ef756c3591a5377d1d9cd7dd5e896da71"}, + {file = "greenlet-3.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1551a8195c0d4a68fac7a4325efac0d541b48def35feb49d803674ac32582f61"}, + {file = "greenlet-3.0.3-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:64d7675ad83578e3fc149b617a444fab8efdafc9385471f868eb5ff83e446b8b"}, + {file = "greenlet-3.0.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b37eef18ea55f2ffd8f00ff8fe7c8d3818abd3e25fb73fae2ca3b672e333a7a6"}, + {file = "greenlet-3.0.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:77457465d89b8263bca14759d7c1684df840b6811b2499838cc5b040a8b5b113"}, + {file = "greenlet-3.0.3-cp39-cp39-win32.whl", hash = "sha256:57e8974f23e47dac22b83436bdcf23080ade568ce77df33159e019d161ce1d1e"}, + {file = "greenlet-3.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:c5ee858cfe08f34712f548c3c363e807e7186f03ad7a5039ebadb29e8c6be067"}, + {file = "greenlet-3.0.3.tar.gz", hash = "sha256:43374442353259554ce33599da8b692d5aa96f8976d567d4badf263371fbe491"}, +] + +[package.extras] +docs = ["Sphinx", "furo"] +test = ["objgraph", "psutil"] + [[package]] name = "h11" version = "0.14.0" @@ -195,6 +318,62 @@ files = [ {file = "MarkupSafe-2.1.5.tar.gz", hash = "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b"}, ] +[[package]] +name = "psutil" +version = "5.9.8" +description = "Cross-platform lib for process and system monitoring in Python." +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +files = [ + {file = "psutil-5.9.8-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:26bd09967ae00920df88e0352a91cff1a78f8d69b3ecabbfe733610c0af486c8"}, + {file = "psutil-5.9.8-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:05806de88103b25903dff19bb6692bd2e714ccf9e668d050d144012055cbca73"}, + {file = "psutil-5.9.8-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:611052c4bc70432ec770d5d54f64206aa7203a101ec273a0cd82418c86503bb7"}, + {file = "psutil-5.9.8-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:50187900d73c1381ba1454cf40308c2bf6f34268518b3f36a9b663ca87e65e36"}, + {file = "psutil-5.9.8-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:02615ed8c5ea222323408ceba16c60e99c3f91639b07da6373fb7e6539abc56d"}, + {file = "psutil-5.9.8-cp27-none-win32.whl", hash = "sha256:36f435891adb138ed3c9e58c6af3e2e6ca9ac2f365efe1f9cfef2794e6c93b4e"}, + {file = "psutil-5.9.8-cp27-none-win_amd64.whl", hash = "sha256:bd1184ceb3f87651a67b2708d4c3338e9b10c5df903f2e3776b62303b26cb631"}, + {file = "psutil-5.9.8-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:aee678c8720623dc456fa20659af736241f575d79429a0e5e9cf88ae0605cc81"}, + {file = "psutil-5.9.8-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8cb6403ce6d8e047495a701dc7c5bd788add903f8986d523e3e20b98b733e421"}, + {file = "psutil-5.9.8-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d06016f7f8625a1825ba3732081d77c94589dca78b7a3fc072194851e88461a4"}, + {file = "psutil-5.9.8-cp36-cp36m-win32.whl", hash = "sha256:7d79560ad97af658a0f6adfef8b834b53f64746d45b403f225b85c5c2c140eee"}, + {file = "psutil-5.9.8-cp36-cp36m-win_amd64.whl", hash = "sha256:27cc40c3493bb10de1be4b3f07cae4c010ce715290a5be22b98493509c6299e2"}, + {file = "psutil-5.9.8-cp37-abi3-win32.whl", hash = "sha256:bc56c2a1b0d15aa3eaa5a60c9f3f8e3e565303b465dbf57a1b730e7a2b9844e0"}, + {file = "psutil-5.9.8-cp37-abi3-win_amd64.whl", hash = "sha256:8db4c1b57507eef143a15a6884ca10f7c73876cdf5d51e713151c1236a0e68cf"}, + {file = "psutil-5.9.8-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:d16bbddf0693323b8c6123dd804100241da461e41d6e332fb0ba6058f630f8c8"}, + {file = "psutil-5.9.8.tar.gz", hash = "sha256:6be126e3225486dff286a8fb9a06246a5253f4c7c53b475ea5f5ac934e64194c"}, +] + +[package.extras] +test = ["enum34", "ipaddress", "mock", "pywin32", "wmi"] + +[[package]] +name = "pyntcore" +version = "2024.3.1.0" +description = "Binary wrappers for the FRC ntcore library" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pyntcore-2024.3.1.0-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:a8e71f96be44b10b417c3e240c5b0c4d2967633ac877bb4b6ec15236d4ec6f8a"}, + {file = "pyntcore-2024.3.1.0-cp310-cp310-manylinux_2_35_x86_64.whl", hash = "sha256:f6977652ea6066303833a3fc1afeb73537ef07ce2ca48d4e6cadc62c5c6b0671"}, + {file = "pyntcore-2024.3.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:7ef9a57a9cd092483e47ba5a3ff6c8bded208f5035b2419244bbb40108f5656e"}, + {file = "pyntcore-2024.3.1.0-cp311-cp311-macosx_12_0_universal2.whl", hash = "sha256:f9b67d6a8afe0dd6a16b818ab19427631b7e0700c9c05c7cc22c76d24ef4160f"}, + {file = "pyntcore-2024.3.1.0-cp311-cp311-manylinux_2_35_x86_64.whl", hash = "sha256:554040f989ccc95a83d0f51142b4c0e397c01156ae4d94c022dd58a24653a482"}, + {file = "pyntcore-2024.3.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:98122bd507cc3c6e5444523c515a874ff2c19fcbd285e144ee561670c6d6b793"}, + {file = "pyntcore-2024.3.1.0-cp312-cp312-macosx_12_0_universal2.whl", hash = "sha256:208cb918529d2043b42e5df36a7987b30ef42906ae9c1b2a6d363a4debae1bdd"}, + {file = "pyntcore-2024.3.1.0-cp312-cp312-manylinux_2_35_x86_64.whl", hash = "sha256:b07f93cbb9d62fac357755feb5f568534916047e36f823325fa84ac9104ebfb7"}, + {file = "pyntcore-2024.3.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:a7049451c5f045192f8a6591e0a587eed4d62c3d879defa573d54041038fc642"}, + {file = "pyntcore-2024.3.1.0-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:40ef78bde4d7c45d648f74d0b505612f02a5bcac0a7ef5df82aa4c9a7b9d1831"}, + {file = "pyntcore-2024.3.1.0-cp38-cp38-manylinux_2_35_x86_64.whl", hash = "sha256:a6971b9b0b2dbcc5abf7c12c64249280adac5a1ec682a8742581af811f5cf3c0"}, + {file = "pyntcore-2024.3.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:30153330b2c72dd659df94213be43501943b4790c78c412cc21f1f0252c3b0a3"}, + {file = "pyntcore-2024.3.1.0-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:d9085851735eb3716e0fd8e437f2679a8a631ff0595e46a1d25b9948ad3303d0"}, + {file = "pyntcore-2024.3.1.0-cp39-cp39-manylinux_2_35_x86_64.whl", hash = "sha256:88ebf4d122039765b4095eff9c3df4bc97650581851c9e8a7ab76dc534ba6389"}, + {file = "pyntcore-2024.3.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:d36a3d629994bea5c13dc09044ffb7869662f8c8ed9377f09e8e3deca70d313e"}, +] + +[package.dependencies] +robotpy-wpinet = "2024.3.1.0" +robotpy-wpiutil = "2024.3.1.0" + [[package]] name = "python-engineio" version = "4.9.0" @@ -234,6 +413,83 @@ asyncio-client = ["aiohttp (>=3.4)"] client = ["requests (>=2.21.0)", "websocket-client (>=0.54.0)"] docs = ["sphinx"] +[[package]] +name = "robotpy-wpinet" +version = "2024.3.1.0" +description = "Binary wrapper for FRC wpinet library" +optional = false +python-versions = ">=3.8" +files = [ + {file = "robotpy_wpinet-2024.3.1.0-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:50b360333fbf9527000766336b556fac6b42a8f83687c7b6af9050bc27a4f667"}, + {file = "robotpy_wpinet-2024.3.1.0-cp310-cp310-manylinux_2_35_x86_64.whl", hash = "sha256:aa705f5cc447e0d8812e95446d4bbb790b47a1cdf1297641286f7c0c51eec452"}, + {file = "robotpy_wpinet-2024.3.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:46d803e2a1eea85943da9e32623c66bda7e9d1cc3aa27120850bd5bdc6072d4d"}, + {file = "robotpy_wpinet-2024.3.1.0-cp311-cp311-macosx_12_0_universal2.whl", hash = "sha256:b9675987f4b091ab7bb34d2fd6881aed5bbf44d5d7c02ff659c1a7551a2c1d25"}, + {file = "robotpy_wpinet-2024.3.1.0-cp311-cp311-manylinux_2_35_x86_64.whl", hash = "sha256:f566e772b3eff48ebe461e26263a20329eee2001137c6b6b1f0805b51b1568ea"}, + {file = "robotpy_wpinet-2024.3.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:c0dbf102138b22977f689de6d1f240e7d88c796e0c162705e5d671f7779849d0"}, + {file = "robotpy_wpinet-2024.3.1.0-cp312-cp312-macosx_12_0_universal2.whl", hash = "sha256:890fd8e40e6780b1460d14627392f78b7110a17cf226fb58a20857ac01bb4f56"}, + {file = "robotpy_wpinet-2024.3.1.0-cp312-cp312-manylinux_2_35_x86_64.whl", hash = "sha256:13554d6d3c370ac5f7b7488d7e4b37318ca9a543f2624cbea957fb8c68bb4c30"}, + {file = "robotpy_wpinet-2024.3.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:6b71b42ebfa89cf96f4dbb286b8300fae8a46437eb2906b22e1e0a3d3bc75cc6"}, + {file = "robotpy_wpinet-2024.3.1.0-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:7cf7695af1067af05c0a68477b83b67a1f3ec3031e27ac9b151207b8926205e1"}, + {file = "robotpy_wpinet-2024.3.1.0-cp38-cp38-manylinux_2_35_x86_64.whl", hash = "sha256:192ce6239aacf8fa336262e97d1720be78b3bdc242ef148bc4f2b692ad6c3583"}, + {file = "robotpy_wpinet-2024.3.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:4bab77e36fa9435f3fbb11dcdca72107eb512d78cb78f9fdefda23a51b8ab3b6"}, + {file = "robotpy_wpinet-2024.3.1.0-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:8f9b9d269012357e65aba50dd04eccef9f19887f41ac38dac8f84a918661f973"}, + {file = "robotpy_wpinet-2024.3.1.0-cp39-cp39-manylinux_2_35_x86_64.whl", hash = "sha256:4f8d4587fb0e13ae542081bdbf660252bfaac225115ebd50fb275bc8188bbc97"}, + {file = "robotpy_wpinet-2024.3.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:bf0cedcc660fcfb06ef3d54bb2ac185c2e41184c345fa9a412213fe80eba78c9"}, +] + +[package.dependencies] +robotpy-wpiutil = "2024.3.1.0" + +[[package]] +name = "robotpy-wpiutil" +version = "2024.3.1.0" +description = "Binary wrapper for FRC WPIUtil library" +optional = false +python-versions = ">=3.8" +files = [ + {file = "robotpy_wpiutil-2024.3.1.0-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:ceb7c478dd9a0cf29d2fef65b44e342babd90d80face92a773e5ec2b0652ef43"}, + {file = "robotpy_wpiutil-2024.3.1.0-cp310-cp310-manylinux_2_35_x86_64.whl", hash = "sha256:eddb9dbe27cb48f6a3c82212b155c143e7799f1f3077517fe57f698e21456606"}, + {file = "robotpy_wpiutil-2024.3.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:3259ef91ad5e3dc0ecff32396d9581923349587d56e12d2f1bffbe343a794ffc"}, + {file = "robotpy_wpiutil-2024.3.1.0-cp311-cp311-macosx_12_0_universal2.whl", hash = "sha256:e71dd8dd3eaead3250d240dd7c2a6ca7c6dd9b74f8e578723779b35ff7f0a413"}, + {file = "robotpy_wpiutil-2024.3.1.0-cp311-cp311-manylinux_2_35_x86_64.whl", hash = "sha256:5eab86b28be91cb13b2cb7cd05ec2f31f4fc4b90f2f61a447ac8e5d250d897c8"}, + {file = "robotpy_wpiutil-2024.3.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:bdb19013b224ed7716f66a41e39cf2e737ed76c55261174191322753af46221b"}, + {file = "robotpy_wpiutil-2024.3.1.0-cp312-cp312-macosx_12_0_universal2.whl", hash = "sha256:b373004b6527683d1ad14f1b2be420be31d96aa65a5faf86387f7d1083cd6bec"}, + {file = "robotpy_wpiutil-2024.3.1.0-cp312-cp312-manylinux_2_35_x86_64.whl", hash = "sha256:10f1c99be9bf9e2e6923104c0d5f1b495c2fd2b22f31f67d94a5f19c6f1a3cc6"}, + {file = "robotpy_wpiutil-2024.3.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:8d646809bfc5e207f70aa233214c88eef79f1a051770826a166c6976c9e6bea3"}, + {file = "robotpy_wpiutil-2024.3.1.0-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:e3fadad2715b463269352e44c2c0f8fc6a87d11e0771fdcd14992657773180eb"}, + {file = "robotpy_wpiutil-2024.3.1.0-cp38-cp38-manylinux_2_35_x86_64.whl", hash = "sha256:610ac4ea866408d5438954a940d43767ae3c07af1e7c2c383bb5c3b09339c757"}, + {file = "robotpy_wpiutil-2024.3.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:9e66f21b3d736360fee0887bd82ee2ea8ca4d903716800061857d2e7209b6bdc"}, + {file = "robotpy_wpiutil-2024.3.1.0-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:71bca449711da367b1f0e4ad8f549a35d5ee0b9ac77a0f4ab6bd52373f330c9f"}, + {file = "robotpy_wpiutil-2024.3.1.0-cp39-cp39-manylinux_2_35_x86_64.whl", hash = "sha256:ef3df62ed1fdb79706e3ec0b46a8879cb3022f058414d6c6d00a1b415c677c2a"}, + {file = "robotpy_wpiutil-2024.3.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:2c3814e2dad1846af8e78a36c2edd4781ed8dca8069d645306a487aadb30cf52"}, +] + +[[package]] +name = "ruff" +version = "0.2.2" +description = "An extremely fast Python linter and code formatter, written in Rust." +optional = false +python-versions = ">=3.7" +files = [ + {file = "ruff-0.2.2-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:0a9efb032855ffb3c21f6405751d5e147b0c6b631e3ca3f6b20f917572b97eb6"}, + {file = "ruff-0.2.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:d450b7fbff85913f866a5384d8912710936e2b96da74541c82c1b458472ddb39"}, + {file = "ruff-0.2.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ecd46e3106850a5c26aee114e562c329f9a1fbe9e4821b008c4404f64ff9ce73"}, + {file = "ruff-0.2.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5e22676a5b875bd72acd3d11d5fa9075d3a5f53b877fe7b4793e4673499318ba"}, + {file = "ruff-0.2.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1695700d1e25a99d28f7a1636d85bafcc5030bba9d0578c0781ba1790dbcf51c"}, + {file = "ruff-0.2.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:b0c232af3d0bd8f521806223723456ffebf8e323bd1e4e82b0befb20ba18388e"}, + {file = "ruff-0.2.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f63d96494eeec2fc70d909393bcd76c69f35334cdbd9e20d089fb3f0640216ca"}, + {file = "ruff-0.2.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6a61ea0ff048e06de273b2e45bd72629f470f5da8f71daf09fe481278b175001"}, + {file = "ruff-0.2.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5e1439c8f407e4f356470e54cdecdca1bd5439a0673792dbe34a2b0a551a2fe3"}, + {file = "ruff-0.2.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:940de32dc8853eba0f67f7198b3e79bc6ba95c2edbfdfac2144c8235114d6726"}, + {file = "ruff-0.2.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:0c126da55c38dd917621552ab430213bdb3273bb10ddb67bc4b761989210eb6e"}, + {file = "ruff-0.2.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:3b65494f7e4bed2e74110dac1f0d17dc8e1f42faaa784e7c58a98e335ec83d7e"}, + {file = "ruff-0.2.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:1ec49be4fe6ddac0503833f3ed8930528e26d1e60ad35c2446da372d16651ce9"}, + {file = "ruff-0.2.2-py3-none-win32.whl", hash = "sha256:d920499b576f6c68295bc04e7b17b6544d9d05f196bb3aac4358792ef6f34325"}, + {file = "ruff-0.2.2-py3-none-win_amd64.whl", hash = "sha256:cc9a91ae137d687f43a44c900e5d95e9617cb37d4c989e462980ba27039d239d"}, + {file = "ruff-0.2.2-py3-none-win_arm64.whl", hash = "sha256:c9d15fc41e6054bfc7200478720570078f0b41c9ae4f010bcc16bd6f4d1aacdd"}, + {file = "ruff-0.2.2.tar.gz", hash = "sha256:e62ed7f36b3068a30ba39193a14274cd706bc486fad521276458022f7bccb31d"}, +] + [[package]] name = "simple-websocket" version = "1.0.0" @@ -251,6 +507,21 @@ wsproto = "*" [package.extras] docs = ["sphinx"] +[[package]] +name = "waitress" +version = "2.1.2" +description = "Waitress WSGI server" +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "waitress-2.1.2-py3-none-any.whl", hash = "sha256:7500c9625927c8ec60f54377d590f67b30c8e70ef4b8894214ac6e4cad233d2a"}, + {file = "waitress-2.1.2.tar.gz", hash = "sha256:780a4082c5fbc0fde6a2fcfe5e26e6efc1e8f425730863c04085769781f51eba"}, +] + +[package.extras] +docs = ["Sphinx (>=1.8.1)", "docutils", "pylons-sphinx-themes (>=1.0.9)"] +testing = ["coverage (>=5.0)", "pytest", "pytest-cover"] + [[package]] name = "werkzeug" version = "3.0.1" @@ -285,4 +556,4 @@ h11 = ">=0.9.0,<1" [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "9141d17ec47da0f8045d0b158eb504c4183abbc7853de70673b64acaea30a2c3" +content-hash = "3afde2c87621fc59faa4e33e0384a7dd132ac8b1471c1fa3e62dadcce0660dde" diff --git a/pyproject.toml b/pyproject.toml index 13ac840..d69cd3a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,11 +7,27 @@ license = "GNU GPL 3.0" readme = "README.md" [tool.poetry.dependencies] -python = "^3.12" -Flask = "^3.0.2" -flask-socketio = "^5.3.6" +python = '^3.12' +pyntcore = '^2024.1.1.1' +Flask = '^3.0.0' +flask-socketio = '^5.3.6' +eventlet = '^0.34.3' +flaskwebgui = '^1.0.8' +waitress = '^2.1.2' +[tool.poetry.group.dev.dependencies] +ruff = '^0.2.2' + +[tool.ruff] +target-version = 'py312' + +[tool.ruff.lint] +select = ['ALL'] +ignore = ['Q000', 'Q003', 'D211', 'D213', 'COM812', 'ISC001', 'INP001', 'PLW0603'] + +[tool.ruff.format] +quote-style = 'single' [build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" +requires = ['poetry-core'] +build-backend = 'poetry.core.masonry.api' \ No newline at end of file