From 9883c097ab9d2b4a5f3045a6ceb3e04190a02df7 Mon Sep 17 00:00:00 2001 From: Daulet Amirkhanov Date: Thu, 18 Sep 2025 16:37:08 +0100 Subject: [PATCH] fix: make `cognee -ui` dependencies (api) part of core deps (#1439) ## Description ## Type of Change - [ ] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [ ] Other (please specify): ## Changes Made - - - ## Testing ## Screenshots/Videos (if applicable) ## Pre-submission Checklist - [ ] **I have tested my changes thoroughly before submitting this PR** - [ ] **This PR contains minimal changes necessary to address the issue/feature** - [ ] My code follows the project's coding standards and style guidelines - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have added necessary documentation (if applicable) - [ ] All new and existing tests pass - [ ] I have searched existing PRs to ensure this change hasn't been submitted already - [ ] I have linked any relevant issues in the description - [ ] My commits have clear and descriptive messages ## Related Issues ## Additional Notes ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin. --- README.md | 10 ---------- pyproject.toml | 7 +++---- uv.lock | 14 ++++++-------- 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index ae1f5f365..41bd1d4ea 100644 --- a/README.md +++ b/README.md @@ -176,16 +176,6 @@ You can also cognify your files and query using cognee UI. Cognee UI 2 -### Installation for UI - -To use the cognee UI with full functionality, you need to install cognee with API dependencies: - -```bash -pip install 'cognee[api]' -``` - -The UI requires backend server functionality (uvicorn and other API dependencies) which are not included in the default cognee installation to keep it lightweight. - ### Running the UI Try cognee UI by running ``` cognee-cli -ui ``` command on your terminal. diff --git a/pyproject.toml b/pyproject.toml index 0c34d8ee1..9e6bbe896 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,14 +62,13 @@ dependencies = [ "pylance>=0.22.0,<1.0.0", "kuzu (==0.11.0)", "python-magic-bin<0.5 ; platform_system == 'Windows'", # Only needed for Windows -] - -[project.optional-dependencies] -api = [ "uvicorn>=0.34.0,<1.0.0", "gunicorn>=20.1.0,<24", "websockets>=15.0.1,<16.0.0" ] + +[project.optional-dependencies] +api=[] distributed = [ "modal>=1.0.5,<2.0.0", ] diff --git a/uv.lock b/uv.lock index 7e3d536d9..327e60ec1 100644 --- a/uv.lock +++ b/uv.lock @@ -823,6 +823,7 @@ dependencies = [ { name = "fastapi" }, { name = "fastapi-users", extra = ["sqlalchemy"] }, { name = "filetype" }, + { name = "gunicorn" }, { name = "instructor" }, { name = "jinja2" }, { name = "kuzu" }, @@ -856,17 +857,14 @@ dependencies = [ { name = "structlog" }, { name = "tiktoken" }, { name = "typing-extensions" }, + { name = "uvicorn" }, + { name = "websockets" }, ] [package.optional-dependencies] anthropic = [ { name = "anthropic" }, ] -api = [ - { name = "gunicorn" }, - { name = "uvicorn" }, - { name = "websockets" }, -] aws = [ { name = "s3fs", extra = ["boto3"] }, ] @@ -993,7 +991,7 @@ requires-dist = [ { name = "google-generativeai", marker = "extra == 'gemini'", specifier = ">=0.8.4,<0.9" }, { name = "graphiti-core", marker = "extra == 'graphiti'", specifier = ">=0.7.0,<0.8" }, { name = "groq", marker = "extra == 'groq'", specifier = ">=0.8.0,<1.0.0" }, - { name = "gunicorn", marker = "extra == 'api'", specifier = ">=20.1.0,<24" }, + { name = "gunicorn", specifier = ">=20.1.0,<24" }, { name = "instructor", specifier = ">=1.9.1,<2.0.0" }, { name = "jinja2", specifier = ">=3.1.3,<4" }, { name = "kuzu", specifier = "==0.11.0" }, @@ -1060,8 +1058,8 @@ requires-dist = [ { name = "tweepy", marker = "extra == 'dev'", specifier = ">=4.14.0,<5.0.0" }, { name = "typing-extensions", specifier = ">=4.12.2,<5.0.0" }, { name = "unstructured", extras = ["csv", "doc", "docx", "epub", "md", "odt", "org", "ppt", "pptx", "rst", "rtf", "tsv", "xlsx"], marker = "extra == 'docs'", specifier = ">=0.18.1,<19" }, - { name = "uvicorn", marker = "extra == 'api'", specifier = ">=0.34.0,<1.0.0" }, - { name = "websockets", marker = "extra == 'api'", specifier = ">=15.0.1,<16.0.0" }, + { name = "uvicorn", specifier = ">=0.34.0,<1.0.0" }, + { name = "websockets", specifier = ">=15.0.1,<16.0.0" }, ] provides-extras = ["api", "distributed", "neo4j", "neptune", "postgres", "postgres-binary", "notebook", "langchain", "llama-index", "gemini", "huggingface", "ollama", "mistral", "anthropic", "deepeval", "posthog", "falkordb", "groq", "chromadb", "docs", "codegraph", "evals", "gui", "graphiti", "aws", "dev", "debug"]