-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expand file tree
/
Copy pathpyproject.toml
More file actions
294 lines (274 loc) · 8.81 KB
/
Copy pathpyproject.toml
File metadata and controls
294 lines (274 loc) · 8.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
[project]
name = "cognee"
version = "1.1.3"
description = "Cognee - is a library for enriching LLM context with a semantic layer for better understanding and reasoning."
authors = [
{ name = "Vasilije Markovic" },
{ name = "Boris Arzentar" },
]
requires-python = ">=3.10,<3.15"
readme = "README.md"
license = "Apache-2.0"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Topic :: Software Development :: Libraries",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
]
dependencies = [
"openai>=1.80.1",
"python-dotenv>=1.0.1,<2.0.0",
"pydantic>=2.10.5",
"pydantic-settings>=2.2.1,<3",
"typing_extensions>=4.12.2,<5.0.0",
"numpy>=1.26.4, <=4.0.0",
"sqlalchemy>=2.0.39,<3.0.0",
"aiosqlite>=0.20.0,<1.0.0",
"tiktoken>=0.8.0,<1.0.0",
"litellm>=1.83.7",
"instructor>=1.9.1,<1.15.3",
"filetype>=1.2.0,<2.0.0",
"aiohttp>=3.13.3,<4.0.0",
"aiofiles>=23.2.1",
"rdflib>=7.1.4,<7.2.0",
"pypdf>=6.6.2,<7.0.0",
"jinja2>=3.1.3,<4",
"lancedb>=0.24.0,<1.0.0",
"nbformat>=5.7.0,<6.0.0",
"alembic>=1.13.3,<2",
"limits>=4.4.1,<5",
"fastapi>=0.116.2,<1.0.0",
"starlette>=0.48",
"python-multipart>=0.0.22,<1.0.0",
"fastapi-users[sqlalchemy]>=15.0.2",
"structlog>=25.2.0,<26",
"pympler>=1.1,<2.0.0",
"pylance>=0.22.0,<=0.36.0",
"ladybug==0.16.0",
"python-magic-bin<0.5 ; platform_system == 'Windows'", # Only needed for Windows
"networkx>=3.4.2,<4",
"uvicorn>=0.34.0,<1.0.0",
"gunicorn>=20.1.0,<24",
"websockets>=15.0.1,<16.0.0",
"tenacity>=9.0.0",
"fakeredis[lua]>=2.32.0",
"diskcache>=5.6.3",
"aiolimiter>=1.2.1",
"urllib3>=2.6.0",
"cbor2>=5.8.0",
"langdetect>=1.0.9",
"datamodel-code-generator>=0.54.0",
]
[project.optional-dependencies]
api=[]
distributed = [
"modal>=1.0.5,<2.0.0",
]
scraping = [
"tavily-python>=0.7.12",
"beautifulsoup4>=4.13.1",
"playwright>=1.9.0",
"lxml>=4.9.3,<5 ; python_version < '3.13'",
"lxml>=5,<6 ; python_version >= '3.13' and python_version < '3.14'",
# cp314 wheels start at lxml 6.0.1; without this 3.14 falls back to a
# source build that requires libxml2/libxslt headers (CI doesn't have them).
"lxml>=6.0.1,<7 ; python_version >= '3.14'",
"protego>=0.1",
"APScheduler>=3.10.0,<=3.11.0"
]
fastembed = [
"fastembed<=0.8.0",
# onnxruntime 1.23.2 only ships wheels through cp313; cp314 wheels start
# at onnxruntime 1.24.1. Split by python_version so existing 3.10–3.13
# users keep the pinned version and 3.14 picks up the first cp314-capable
# release.
"onnxruntime<=1.23.2 ; python_version < '3.14'",
"onnxruntime>=1.24.1 ; python_version >= '3.14'",
]
neo4j = ["neo4j>=5.28.0,<6"]
neptune = ["langchain_aws>=0.2.22"]
postgres = [
"psycopg2>=2.9.10,<3",
"pgvector>=0.3.5,<0.4",
"asyncpg>=0.30.0,<1.0.0",
]
postgres-binary = [
"psycopg2-binary>=2.9.10,<3.0.0",
"pgvector>=0.3.5,<0.4",
"asyncpg>=0.30.0,<1.0.0",
]
notebook = ["notebook>=7.1.0,<8"]
langchain = [
"langsmith>=0.2.3,<1.0.0",
"langchain_text_splitters>=0.3.2,<1.0.0",
"langchain-core>=1.2.5"
]
llama-index = ["llama-index-core>=0.14.20,<0.15"]
huggingface = ["transformers>=4.46.3,<5"]
ollama = ["transformers>=4.46.3,<5"]
mistral = ["mistral-common>=1.5.2,<2", "mistralai>=1.9.10,<2"]
anthropic = ["anthropic>=0.27"]
azure = ["azure-identity>=1.15.0,<2"]
deepeval = ["deepeval>=3.0.1,<4"]
posthog = ["posthog>=3.5.0,<4"]
groq = ["groq>=0.8.0,<1.0.0"]
llama-cpp = ["llama-cpp-python[server]>=0.3.0,<1.0.0"]
chromadb = [
"chromadb>=0.6,<0.7",
# pypika 0.48.9's setup.py uses ast.Str, which Python 3.14 removed (it
# was deprecated since 3.8). Build fails with "module 'ast' has no
# attribute 'Str'". Allow newer pypika on 3.14 — chromadb itself only
# requires pypika>=0.48.9, so this is in-range for it.
"pypika==0.48.9 ; python_version < '3.14'",
"pypika>=0.50.0 ; python_version >= '3.14'",
]
docs = [
"lxml>=4.9.3,<5 ; python_version < '3.13'",
"lxml>=5,<6 ; python_version >= '3.13' and python_version < '3.14'",
# cp314 wheels start at lxml 6.0.1.
"lxml>=6.0.1,<7 ; python_version >= '3.14'",
"unstructured[csv, doc, docx, epub, md, odt, org, ppt, pptx, rst, rtf, tsv, xlsx, pdf]>=0.18.1,<19",
"nltk>=3.9.3,<4", # TODO: Remove when unstructured is above v0.21.0 as it won't use nltk anymore
]
codegraph = [
"fastembed<=0.8.0 ; python_version < '3.14'",
"transformers>=4.46.3,<5",
"tree-sitter>=0.24.0,<0.25",
"tree-sitter-python>=0.23.6,<0.24",
]
evals = [
"plotly>=6.0.0,<7",
"gdown>=5.2.0,<6",
"pandas>=2.2.2,<3.0.0",
"matplotlib>=3.8.3,<4",
"scikit-learn>=1.6.1,<2",
"locust>=2.0.0,<3",
]
graphiti = ["graphiti-core>=0.28.0"]
# Note: New s3fs and boto3 versions don't work well together
# Always use comaptible fixed versions of these two dependencies
aws = ["s3fs[boto3]==2025.3.2"]
dlt = ["dlt[sqlalchemy]>=1.9.0,<2"]
baml = ["baml-py (==0.206.0)"]
dev = [
"pytest>=7.4.0,<8",
"pytest-cov>=6.1.1,<7.0.0",
"pytest-asyncio>=0.21.1,<0.22",
"coverage>=7.3.2,<8",
"pre-commit>=4.0.1,<5",
"notebook>=7.1.0,<8",
"deptry>=0.20.0,<0.21",
"ruff>=0.9.2,<=0.16.0",
"tweepy>=4.14.0,<5.0.0",
"gitpython>=3.1.43,<4",
"mkdocs-material>=9.5.42,<10",
"mkdocs-minify-plugin>=0.8.0,<0.9",
"mkdocstrings[python]>=0.26.2,<0.27",
"ty>=0.0.31,<0.1.0",
]
debug = ["debugpy>=1.8.9,<2.0.0"]
redis = ["redis>=5.0.3,<6.0.0"]
tracing = [
"opentelemetry-api>=1.20.0,<2",
"opentelemetry-sdk>=1.20.0,<2",
"opentelemetry-exporter-otlp-proto-grpc>=1.20.0,<2",
"opentelemetry-exporter-otlp-proto-http>=1.20.0,<2",
]
monitoring = [
"sentry-sdk[fastapi]>=2.9.0,<3",
"langfuse>=2.32.0,<3",
"opentelemetry-api>=1.20.0,<2",
"opentelemetry-sdk>=1.20.0,<2",
"opentelemetry-exporter-otlp-proto-grpc>=1.20.0,<2",
"opentelemetry-exporter-otlp-proto-http>=1.20.0,<2",
]
docling = ["docling>=2.54", "transformers>=4.55"]
[project.urls]
Homepage = "https://www.cognee.ai"
Repository = "https://github.com/topoteretes/cognee"
[project.scripts]
cognee-cli = "cognee.cli._cognee:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build]
exclude = [
"/bin",
"/dist",
"/.data",
"/.github",
"/deployment",
"/cognee-mcp",
"/cognee-frontend",
"/examples",
"/helm",
"/licenses",
"/logs",
"/notebooks",
"/profiling",
"/tests",
"/tools",
]
[tool.hatch.build.targets.wheel]
packages = ["cognee", "cognee_db_workers", "distributed", "kuzu"]
[tool.uv]
# Note: exclude newer packages that are less than 2 days old
exclude-newer = "2 days"
constraint-dependencies = [
"protobuf>=5.29.6, !=6.30.*, !=6.31.*, !=6.32.*, !=6.33.1, !=6.33.2, !=6.33.3, !=6.33.4", # protobuf 6.33.5 and higher versions + version 5.29.6
"pyasn1>=0.6.2",
"wheel>=0.46.2",
"nltk>=3.9.3",
# spacy 3.8.14 dropped cp314 wheels (3.8.10-3.8.13 had them); pin so the
# Python 3.14 release path keeps a wheel available. Pulled transitively
# via unstructured.
"spacy<3.8.14 ; python_version >= '3.14'",
# scipy cp314 wheels start at 1.16.1; 1.16+ also dropped cp310, so the
# resolver collapses <3.11 and >=3.14 onto the latest cp310-compatible
# version (1.15.3) by default — which has no cp314 wheel. Force 3.14 to
# use 1.16.1+ so the wheel-only release sync succeeds. Pulled
# transitively via pandas / scikit-learn / fastembed.
"scipy>=1.16.1 ; python_version >= '3.14'",
]
[tool.ruff]
line-length = 100
exclude = [
"migrations/", # Ignore migrations directory
"notebooks/", # Ignore notebook files
"build/", # Ignore build directory
"cognee/pipelines.py",
"cognee/modules/users/models/Group.py",
"cognee/modules/users/models/ACL.py",
"cognee/modules/pipelines/models/Task.py",
"cognee/modules/data/models/Dataset.py",
"cognee/modules/notebooks/tutorials/" # Ignore tutorial Python files
]
[tool.ruff.lint]
ignore = ["F401"]
[tool.ty.src]
# TODO: Gradually add more directories to include until we have type hints for all modules
include = [
"cognee/infrastructure/context",
"cognee/infrastructure/data",
"cognee/infrastructure/engine",
"cognee/infrastructure/entities",
"cognee/infrastructure/files",
"cognee/infrastructure/llm",
"cognee/infrastructure/loaders",
"cognee/infrastructure/locks",
"cognee/infrastructure/session",
"cognee/infrastructure/utils",
"cognee/shared"
]
# Exclude generated files
exclude = ["cognee/infrastructure/llm/structured_output_framework/baml/baml_client/"]
[dependency-groups]
dev = [
"httpx>=0.28.1",
"pytest>=7.4.4",
"pytest-asyncio>=0.21.2",
"ruff>=0.13.1",
]