/ pyproject.toml
pyproject.toml
1 [build-system] 2 requires = ["hatchling", "hatch-vcs"] 3 build-backend = "hatchling.build" 4 5 [project] 6 name = "khoj" 7 description = "Your Second Brain" 8 readme = "README.md" 9 license = "AGPL-3.0-or-later" 10 requires-python = ">=3.10, <3.13" 11 authors = [ 12 { name = "Debanjum Singh Solanky, Saba Imran" }, 13 ] 14 keywords = [ 15 "search", 16 "semantic-search", 17 "productivity", 18 "NLP", 19 "AI", 20 "org-mode", 21 "markdown", 22 "images", 23 "pdf", 24 ] 25 classifiers = [ 26 "Development Status :: 5 - Production/Stable", 27 "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", 28 "Operating System :: OS Independent", 29 "Programming Language :: Python :: 3", 30 "Programming Language :: Python :: 3.10", 31 "Programming Language :: Python :: 3.11", 32 "Programming Language :: Python :: 3.12", 33 "Topic :: Internet :: WWW/HTTP :: Indexing/Search", 34 "Topic :: Scientific/Engineering :: Artificial Intelligence", 35 "Topic :: Scientific/Engineering :: Human Machine Interfaces", 36 "Intended Audience :: Information Technology", 37 ] 38 dependencies = [ 39 "beautifulsoup4 ~= 4.12.3", 40 "dateparser >= 1.1.1", 41 "defusedxml == 0.7.1", 42 "fastapi >= 0.110.0", 43 "python-multipart >= 0.0.22", 44 "jinja2 == 3.1.6", 45 "openai >= 2.0.0, < 3.0.0", 46 "tiktoken >= 0.3.2", 47 "tenacity >= 9.0.0", 48 "magika ~= 0.5.1", 49 "pillow >= 12.1.1", 50 "pydantic[email] >= 2.0.0", 51 "pyyaml ~= 6.0", 52 "rich >= 13.3.1", 53 "click < 8.2.2", 54 "schedule == 1.1.0", 55 "sentence-transformers == 3.4.1", 56 "einops == 0.8.0", 57 "transformers >= 4.53.0", 58 "torch == 2.6.0", 59 "uvicorn >= 0.31.1", 60 "aiohttp ~= 3.13.0", 61 "langchain-text-splitters == 0.3.11", 62 "langchain-community == 0.3.31", 63 "requests >= 2.33.0", 64 "anyio ~= 4.8.0", 65 "pymupdf == 1.24.11", 66 "django == 5.1.15", 67 "django-unfold == 0.42.0", 68 "authlib == 1.6.9", 69 "itsdangerous == 2.1.2", 70 "httpx == 0.28.1", 71 "pgvector == 0.2.4", 72 "psycopg2-binary == 2.9.9", 73 "lxml == 4.9.3", 74 "tzdata == 2023.3", 75 "rapidocr-onnxruntime == 1.4.4", 76 "openai-whisper >= 20231117", 77 "django-phonenumber-field == 7.3.0", 78 "phonenumbers == 8.13.27", 79 "markdownify ~= 0.14.1", 80 "markdown-it-py ~= 3.0.0", 81 "websockets == 13.0", 82 "psutil >= 5.8.0", 83 "huggingface-hub[hf_xet] >= 0.22.2", 84 "apscheduler ~= 3.10.0", 85 "pytz ~= 2024.1", 86 "cron-descriptor == 1.4.3", 87 "django_apscheduler == 0.7.0", 88 "anthropic == 0.75.0", 89 "docx2txt == 0.8", 90 "google-genai == 1.52.0", 91 "google-auth ~= 2.23.3", 92 "pyjson5 == 1.6.7", 93 "resend == 1.2.0", 94 "email-validator == 2.2.0", 95 "e2b-code-interpreter ~= 1.0.0", 96 "mcp >= 1.23.0", 97 "pyasn1>=0.6.3", 98 ] 99 dynamic = ["version"] 100 101 [project.urls] 102 Homepage = "https://khoj.dev" 103 Documentation = "https://docs.khoj.dev" 104 Code = "https://github.com/khoj-ai/khoj" 105 106 [project.scripts] 107 khoj = "khoj.main:run" 108 109 [project.optional-dependencies] 110 prod = [ 111 "gunicorn == 22.0.0", 112 "stripe == 7.3.0", 113 "twilio == 8.11", 114 "boto3 >= 1.34.57", 115 ] 116 local = [ 117 "pgserver == 0.1.4", 118 ] 119 dev = [ 120 "khoj[prod,local]", 121 "pytest >= 7.1.2", 122 "pytest-xdist[psutil]", 123 "pytest-django == 4.5.2", 124 "pytest-asyncio == 0.21.1", 125 "freezegun >= 1.2.0", 126 "factory-boy >= 3.2.1", 127 "mypy >= 1.0.1", 128 "ruff >= 0.12.0", 129 "pre-commit >= 3.0.4", 130 "gitpython ~= 3.1.43", 131 "datasets", 132 "pandas", 133 ] 134 135 [tool.hatch.version] 136 source = "vcs" 137 raw-options.local_scheme = "no-local-version" # PEP440 compliant version for PyPi 138 139 [tool.hatch.build.targets.sdist] 140 include = ["src/khoj"] 141 142 [tool.hatch.build.targets.wheel] 143 packages = ["src/khoj"] 144 145 [tool.mypy] 146 files = "src/khoj" 147 pretty = true 148 strict_optional = false 149 install_types = true 150 ignore_missing_imports = true 151 non_interactive = true 152 show_error_codes = true 153 warn_unused_ignores = false 154 155 [tool.ruff] 156 line-length = 120 157 158 [tool.ruff.lint] 159 select = ["E", "F", "I"] # Enable error, warning, and import checks 160 ignore = [ 161 "E501", # Ignore line length 162 "F405", # Ignore name not defined (e.g., from imports) 163 "E402", # Ignore module level import not at top of file 164 ] 165 unfixable = ["F841"] # Don't auto-remove unused variables 166 exclude = [ "tests/*.py" ] 167 [tool.ruff.lint.per-file-ignores] 168 "src/khoj/main.py" = [ 169 "I001", # Ignore Import order 170 "I002", # Ignore Import not at top of file 171 "E402", # Ignore module level import not at top of file 172 ] 173 174 [tool.ruff.format] 175 quote-style = "double" 176 indent-style = "space" 177 178 [tool.ruff.lint.isort] 179 known-first-party = ["khoj"] 180 181 [tool.uv] 182 build-constraint-dependencies = ["setuptools>=61.2,<82"] 183 184 [tool.pytest.ini_options] 185 addopts = "--strict-markers" 186 markers = [ 187 "chatquality: Evaluate chatbot capabilities and quality", 188 ]