From 68606892993a3839e31e32e3450a04f4e5540759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Pluta?= Date: Fri, 9 Jan 2026 10:35:53 +0100 Subject: [PATCH] Init flask --- conmorfeusz/conmorfeusz/main.py | 8 +++----- conmorfeusz/conmorfeusz/web.py | 10 ++++++++++ conmorfeusz/default.nix | 1 + conmorfeusz/pyproject.toml | 3 ++- 4 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 conmorfeusz/conmorfeusz/web.py diff --git a/conmorfeusz/conmorfeusz/main.py b/conmorfeusz/conmorfeusz/main.py index 8f06bf2..8fcbee7 100644 --- a/conmorfeusz/conmorfeusz/main.py +++ b/conmorfeusz/conmorfeusz/main.py @@ -1,6 +1,4 @@ -import morfeusz2 +import conmorfeusz.web as web + def main(): - morf = morfeusz2.Morfeusz() - analysis = morf.analyse('Ala ma kota.') - for i, j, interp in analysis: - print(i, j, interp) \ No newline at end of file + web.start() \ No newline at end of file diff --git a/conmorfeusz/conmorfeusz/web.py b/conmorfeusz/conmorfeusz/web.py new file mode 100644 index 0000000..582a0d0 --- /dev/null +++ b/conmorfeusz/conmorfeusz/web.py @@ -0,0 +1,10 @@ +from flask import Flask + +app = Flask(__name__) + +@app.route("/") +def hello(): + return "Hello, world" + +def start(): + app.run(port=3000) \ No newline at end of file diff --git a/conmorfeusz/default.nix b/conmorfeusz/default.nix index aaa90b8..5cb8b82 100644 --- a/conmorfeusz/default.nix +++ b/conmorfeusz/default.nix @@ -42,6 +42,7 @@ in propagatedBuildInputs = with pythonPackages; [ morfeusz2 + flask ]; nativeBuildInputs = with pythonPackages; [ diff --git a/conmorfeusz/pyproject.toml b/conmorfeusz/pyproject.toml index 5b6c572..e6a39a3 100644 --- a/conmorfeusz/pyproject.toml +++ b/conmorfeusz/pyproject.toml @@ -9,7 +9,8 @@ description = "Connects Morfeusz and Concraft-pl glued together" requires-python = "==3.6" dependencies = [ - "morfeusz2==1.99.12" + "morfeusz2==1.99.12", + "flask" ] [tool.setuptools]