pyproject.toml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. [build-system]
  2. requires = ["setuptools>=64", "wheel"]
  3. build-backend = "setuptools.build_meta"
  4. [project]
  5. name = "lightrag-hku"
  6. dynamic = ["version"]
  7. authors = [
  8. {name = "Zirui Guo"}
  9. ]
  10. description = "LightRAG: Simple and Fast Retrieval-Augmented Generation"
  11. readme = "README.md"
  12. license = {text = "MIT"}
  13. requires-python = ">=3.10"
  14. classifiers = [
  15. "Development Status :: 4 - Beta",
  16. "Programming Language :: Python :: 3",
  17. "License :: OSI Approved :: MIT License",
  18. "Operating System :: OS Independent",
  19. "Intended Audience :: Developers",
  20. "Topic :: Software Development :: Libraries :: Python Modules",
  21. ]
  22. dependencies = [
  23. "aiohttp",
  24. "configparser",
  25. "google-api-core>=2.0.0,<3.0.0",
  26. "google-genai>=1.0.0,<3.0.0",
  27. "json_repair",
  28. "nano-vectordb",
  29. "networkx",
  30. "numpy>=1.24.0,<3.0.0",
  31. "packaging",
  32. "pandas>=2.0.0,<2.4.0",
  33. "pipmaster",
  34. "pydantic",
  35. "pypinyin",
  36. "PyYAML>=6.0,<7.0",
  37. "python-dotenv",
  38. "setuptools",
  39. "tenacity",
  40. "tiktoken",
  41. "xlsxwriter>=3.1.0",
  42. ]
  43. [project.optional-dependencies]
  44. # Test framework dependencies (for CI/CD and testing)
  45. pytest = [
  46. "pytest>=8.4.2",
  47. "pytest-asyncio>=1.2.0",
  48. "pre-commit",
  49. "ruff",
  50. ]
  51. api = [
  52. # Core dependencies
  53. "aiohttp",
  54. "configparser",
  55. "json_repair",
  56. "nano-vectordb",
  57. "networkx",
  58. "numpy>=1.24.0,<3.0.0",
  59. "openai>=2.0.0,<3.0.0",
  60. "pandas>=2.0.0,<2.4.0",
  61. "pipmaster",
  62. "pydantic",
  63. "pypinyin",
  64. "PyYAML>=6.0,<7.0",
  65. "python-dotenv",
  66. "setuptools",
  67. "tenacity",
  68. "tiktoken",
  69. "xlsxwriter>=3.1.0",
  70. "google-api-core>=2.0.0,<3.0.0",
  71. "google-genai>=1.0.0,<3.0.0",
  72. # API-specific dependencies
  73. "aiofiles",
  74. "ascii_colors",
  75. "distro",
  76. "fastapi>=0.108", # 0.108 adds FastAPI.__call__ scope["root_path"] override; api_prefix relies on it
  77. "httpcore",
  78. "httpx>=0.28.1",
  79. "jiter",
  80. "bcrypt>=4.0.0",
  81. "psutil",
  82. "PyJWT>=2.8.0,<3.0.0",
  83. "python-jose[cryptography]",
  84. "python-multipart",
  85. "pytz",
  86. "uvicorn",
  87. "gunicorn",
  88. # Document processing dependencies (required for API document upload functionality)
  89. "openpyxl>=3.0.0,<4.0.0", # XLSX processing
  90. "pycryptodome>=3.0.0,<4.0.0", # PDF encryption support
  91. "pypdf>=6.1.0", # PDF processing
  92. "python-docx>=0.8.11,<2.0.0", # DOCX processing
  93. "python-pptx>=0.6.21,<2.0.0", # PPTX processing
  94. "defusedxml>=0.7.0,<1.0.0", # Safer XML parser used by parser/docx
  95. # Chunking strategies (process_options=R / V); lazy-imported by lightrag.chunker
  96. "langchain-text-splitters>=0.3,<2",
  97. "langchain-experimental>=0.3,<1",
  98. ]
  99. # Offline deployment dependencies (layered design for flexibility)
  100. offline-storage = [
  101. # Storage backend dependencies
  102. "redis>=5.0.0,<8.0.0",
  103. "neo4j>=5.0.0,<7.0.0",
  104. "pymilvus>=2.6.2,<4.0.0",
  105. "pymongo>=4.0.0,<5.0.0",
  106. "asyncpg>=0.31.0,<1.0.0",
  107. "pgvector>=0.4.2,<1.0.0",
  108. "qdrant-client>=1.11.0,<2.0.0",
  109. "opensearch-py>=3.0.0,<4.0.0",
  110. ]
  111. offline-llm = [
  112. # LLM provider dependencies
  113. "openai>=2.0.0,<3.0.0",
  114. "anthropic>=0.18.0,<1.0.0",
  115. "ollama>=0.1.0,<1.0.0",
  116. "zhipuai>=2.0.0,<3.0.0",
  117. "aioboto3>=12.0.0,<16.0.0",
  118. "voyageai>=0.2.0,<1.0.0",
  119. "llama-index>=0.14.0,<1.0.0", # Updated to ensure compatibility with openai 2.x
  120. "llama-index-llms-openai>=0.6.12", # Explicitly require version that supports openai 2.x
  121. "google-api-core>=2.0.0,<3.0.0",
  122. "google-genai>=1.0.0,<3.0.0",
  123. ]
  124. offline = [
  125. # Complete offline package (includes api for document processing, plus storage and LLM)
  126. "lightrag-hku[api,offline-storage,offline-llm]",
  127. ]
  128. test = [
  129. "lightrag-hku[api]",
  130. "pytest>=8.4.2",
  131. "pytest-asyncio>=1.2.0",
  132. "pre-commit",
  133. "ruff",
  134. ]
  135. evaluation = [
  136. "lightrag-hku[api]",
  137. "ragas>=0.3.7",
  138. "datasets>=4.3.0",
  139. ]
  140. observability = [
  141. # LLM observability and tracing dependencies
  142. "langfuse>=3.8.1",
  143. ]
  144. [project.scripts]
  145. lightrag-server = "lightrag.api.lightrag_server:main"
  146. lightrag-gunicorn = "lightrag.api.run_with_gunicorn:main"
  147. lightrag-hash-password = "lightrag.tools.hash_password:main"
  148. lightrag-download-cache = "lightrag.tools.download_cache:main"
  149. lightrag-clean-llmqc = "lightrag.tools.clean_llm_query_cache:main"
  150. [project.urls]
  151. Homepage = "https://github.com/HKUDS/LightRAG"
  152. Documentation = "https://github.com/HKUDS/LightRAG"
  153. Repository = "https://github.com/HKUDS/LightRAG"
  154. "Bug Tracker" = "https://github.com/HKUDS/LightRAG/issues"
  155. [tool.setuptools.packages.find]
  156. include = ["lightrag*"]
  157. exclude = ["data*", "tests*", "scripts*", "examples*", "dickens*", "reproduce*", "output_complete*", "rag_storage*", "inputs*"]
  158. [tool.setuptools]
  159. include-package-data = true
  160. [tool.setuptools.dynamic]
  161. version = {attr = "lightrag._version.__version__"}
  162. [tool.setuptools.package-data]
  163. lightrag = ["api/webui/**/*", "api/static/**/*"]
  164. [tool.pytest.ini_options]
  165. asyncio_mode = "auto"
  166. asyncio_default_fixture_loop_scope = "function"
  167. testpaths = ["tests"]
  168. python_files = ["test_*.py"]
  169. python_classes = ["Test*"]
  170. python_functions = ["test_*"]
  171. [tool.ruff]
  172. target-version = "py310"