diff --git a/Makefile b/Makefile index 8ef4ca3d..7ed115af 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ format: # Lint code lint: $(RUFF) check - $(MYPY) ./core --show-column-numbers --show-error-codes --pretty + $(MYPY) ./graphiti_core --show-column-numbers --show-error-codes --pretty # Run tests test: diff --git a/examples/podcast/podcast_runner.py b/examples/podcast/podcast_runner.py index 3c09508d..ef343f0b 100644 --- a/examples/podcast/podcast_runner.py +++ b/examples/podcast/podcast_runner.py @@ -22,9 +22,9 @@ from dotenv import load_dotenv from transcript_parser import parse_podcast_messages -from core import Graphiti -from core.utils.bulk_utils import BulkEpisode -from core.utils.maintenance.graph_data_operations import clear_data +from graphiti_core import Graphiti +from graphiti_core.utils.bulk_utils import BulkEpisode +from graphiti_core.utils.maintenance.graph_data_operations import clear_data load_dotenv() diff --git a/core/__init__.py b/graphiti_core/__init__.py similarity index 100% rename from core/__init__.py rename to graphiti_core/__init__.py diff --git a/core/edges.py b/graphiti_core/edges.py similarity index 97% rename from core/edges.py rename to graphiti_core/edges.py index ca80103c..b269fad9 100644 --- a/core/edges.py +++ b/graphiti_core/edges.py @@ -23,8 +23,8 @@ from neo4j import AsyncDriver from pydantic import BaseModel, Field -from core.llm_client.config import EMBEDDING_DIM -from core.nodes import Node +from graphiti_core.llm_client.config import EMBEDDING_DIM +from graphiti_core.nodes import Node logger = logging.getLogger(__name__) diff --git a/core/graphiti.py b/graphiti_core/graphiti.py similarity index 94% rename from core/graphiti.py rename to graphiti_core/graphiti.py index 1632cfa2..3ddb9721 100644 --- a/core/graphiti.py +++ b/graphiti_core/graphiti.py @@ -24,19 +24,19 @@ from dotenv import load_dotenv from neo4j import AsyncGraphDatabase -from core.edges import EntityEdge, EpisodicEdge -from core.llm_client import LLMClient, LLMConfig, OpenAIClient -from core.nodes import EntityNode, EpisodicNode -from core.search.search import SearchConfig, hybrid_search -from core.search.search_utils import ( +from graphiti_core.edges import EntityEdge, EpisodicEdge +from graphiti_core.llm_client import LLMClient, LLMConfig, OpenAIClient +from graphiti_core.nodes import EntityNode, EpisodicNode +from graphiti_core.search.search import SearchConfig, hybrid_search +from graphiti_core.search.search_utils import ( get_relevant_edges, get_relevant_nodes, ) -from core.utils import ( +from graphiti_core.utils import ( build_episodic_edges, retrieve_episodes, ) -from core.utils.bulk_utils import ( +from graphiti_core.utils.bulk_utils import ( BulkEpisode, dedupe_edges_bulk, dedupe_nodes_bulk, @@ -44,16 +44,16 @@ resolve_edge_pointers, retrieve_previous_episodes_bulk, ) -from core.utils.maintenance.edge_operations import ( +from graphiti_core.utils.maintenance.edge_operations import ( dedupe_extracted_edges, extract_edges, ) -from core.utils.maintenance.graph_data_operations import ( +from graphiti_core.utils.maintenance.graph_data_operations import ( EPISODE_WINDOW_LEN, build_indices_and_constraints, ) -from core.utils.maintenance.node_operations import dedupe_extracted_nodes, extract_nodes -from core.utils.maintenance.temporal_operations import ( +from graphiti_core.utils.maintenance.node_operations import dedupe_extracted_nodes, extract_nodes +from graphiti_core.utils.maintenance.temporal_operations import ( extract_edge_dates, invalidate_edges, prepare_edges_for_invalidation, diff --git a/core/llm_client/__init__.py b/graphiti_core/llm_client/__init__.py similarity index 100% rename from core/llm_client/__init__.py rename to graphiti_core/llm_client/__init__.py diff --git a/core/llm_client/client.py b/graphiti_core/llm_client/client.py similarity index 100% rename from core/llm_client/client.py rename to graphiti_core/llm_client/client.py diff --git a/core/llm_client/config.py b/graphiti_core/llm_client/config.py similarity index 100% rename from core/llm_client/config.py rename to graphiti_core/llm_client/config.py diff --git a/core/llm_client/openai_client.py b/graphiti_core/llm_client/openai_client.py similarity index 100% rename from core/llm_client/openai_client.py rename to graphiti_core/llm_client/openai_client.py diff --git a/core/nodes.py b/graphiti_core/nodes.py similarity index 98% rename from core/nodes.py rename to graphiti_core/nodes.py index b77c3ce0..477d2ab7 100644 --- a/core/nodes.py +++ b/graphiti_core/nodes.py @@ -24,7 +24,7 @@ from openai import OpenAI from pydantic import BaseModel, Field -from core.llm_client.config import EMBEDDING_DIM +from graphiti_core.llm_client.config import EMBEDDING_DIM logger = logging.getLogger(__name__) diff --git a/core/prompts/__init__.py b/graphiti_core/prompts/__init__.py similarity index 100% rename from core/prompts/__init__.py rename to graphiti_core/prompts/__init__.py diff --git a/core/prompts/dedupe_edges.py b/graphiti_core/prompts/dedupe_edges.py similarity index 100% rename from core/prompts/dedupe_edges.py rename to graphiti_core/prompts/dedupe_edges.py diff --git a/core/prompts/dedupe_nodes.py b/graphiti_core/prompts/dedupe_nodes.py similarity index 100% rename from core/prompts/dedupe_nodes.py rename to graphiti_core/prompts/dedupe_nodes.py diff --git a/core/prompts/extract_edge_dates.py b/graphiti_core/prompts/extract_edge_dates.py similarity index 100% rename from core/prompts/extract_edge_dates.py rename to graphiti_core/prompts/extract_edge_dates.py diff --git a/core/prompts/extract_edges.py b/graphiti_core/prompts/extract_edges.py similarity index 100% rename from core/prompts/extract_edges.py rename to graphiti_core/prompts/extract_edges.py diff --git a/core/prompts/extract_nodes.py b/graphiti_core/prompts/extract_nodes.py similarity index 100% rename from core/prompts/extract_nodes.py rename to graphiti_core/prompts/extract_nodes.py diff --git a/core/prompts/invalidate_edges.py b/graphiti_core/prompts/invalidate_edges.py similarity index 100% rename from core/prompts/invalidate_edges.py rename to graphiti_core/prompts/invalidate_edges.py diff --git a/core/prompts/lib.py b/graphiti_core/prompts/lib.py similarity index 100% rename from core/prompts/lib.py rename to graphiti_core/prompts/lib.py diff --git a/core/prompts/models.py b/graphiti_core/prompts/models.py similarity index 100% rename from core/prompts/models.py rename to graphiti_core/prompts/models.py diff --git a/core/search/__init__.py b/graphiti_core/search/__init__.py similarity index 100% rename from core/search/__init__.py rename to graphiti_core/search/__init__.py diff --git a/core/search/search.py b/graphiti_core/search/search.py similarity index 90% rename from core/search/search.py rename to graphiti_core/search/search.py index 77165462..956ae65d 100644 --- a/core/search/search.py +++ b/graphiti_core/search/search.py @@ -21,17 +21,17 @@ from neo4j import AsyncDriver from pydantic import BaseModel -from core.edges import EntityEdge -from core.llm_client.config import EMBEDDING_DIM -from core.nodes import EntityNode, EpisodicNode -from core.search.search_utils import ( +from graphiti_core.edges import EntityEdge +from graphiti_core.llm_client.config import EMBEDDING_DIM +from graphiti_core.nodes import EntityNode, EpisodicNode +from graphiti_core.search.search_utils import ( edge_fulltext_search, edge_similarity_search, get_mentioned_nodes, rrf, ) -from core.utils import retrieve_episodes -from core.utils.maintenance.graph_data_operations import EPISODE_WINDOW_LEN +from graphiti_core.utils import retrieve_episodes +from graphiti_core.utils.maintenance.graph_data_operations import EPISODE_WINDOW_LEN logger = logging.getLogger(__name__) diff --git a/core/search/search_utils.py b/graphiti_core/search/search_utils.py similarity index 99% rename from core/search/search_utils.py rename to graphiti_core/search/search_utils.py index 97046aaf..2325a730 100644 --- a/core/search/search_utils.py +++ b/graphiti_core/search/search_utils.py @@ -8,8 +8,8 @@ from neo4j import AsyncDriver from neo4j import time as neo4j_time -from core.edges import EntityEdge -from core.nodes import EntityNode, EpisodicNode +from graphiti_core.edges import EntityEdge +from graphiti_core.nodes import EntityNode, EpisodicNode logger = logging.getLogger(__name__) diff --git a/core/utils/__init__.py b/graphiti_core/utils/__init__.py similarity index 100% rename from core/utils/__init__.py rename to graphiti_core/utils/__init__.py diff --git a/core/utils/bulk_utils.py b/graphiti_core/utils/bulk_utils.py similarity index 92% rename from core/utils/bulk_utils.py rename to graphiti_core/utils/bulk_utils.py index 6aa8cb36..2c0cbfaa 100644 --- a/core/utils/bulk_utils.py +++ b/graphiti_core/utils/bulk_utils.py @@ -22,19 +22,19 @@ from numpy import dot from pydantic import BaseModel -from core.edges import Edge, EntityEdge, EpisodicEdge -from core.llm_client import LLMClient -from core.nodes import EntityNode, EpisodicNode -from core.search.search_utils import get_relevant_edges, get_relevant_nodes -from core.utils import retrieve_episodes -from core.utils.maintenance.edge_operations import ( +from graphiti_core.edges import Edge, EntityEdge, EpisodicEdge +from graphiti_core.llm_client import LLMClient +from graphiti_core.nodes import EntityNode, EpisodicNode +from graphiti_core.search.search_utils import get_relevant_edges, get_relevant_nodes +from graphiti_core.utils import retrieve_episodes +from graphiti_core.utils.maintenance.edge_operations import ( build_episodic_edges, dedupe_edge_list, dedupe_extracted_edges, extract_edges, ) -from core.utils.maintenance.graph_data_operations import EPISODE_WINDOW_LEN -from core.utils.maintenance.node_operations import ( +from graphiti_core.utils.maintenance.graph_data_operations import EPISODE_WINDOW_LEN +from graphiti_core.utils.maintenance.node_operations import ( dedupe_extracted_nodes, dedupe_node_list, extract_nodes, diff --git a/core/utils/maintenance/__init__.py b/graphiti_core/utils/maintenance/__init__.py similarity index 100% rename from core/utils/maintenance/__init__.py rename to graphiti_core/utils/maintenance/__init__.py diff --git a/core/utils/maintenance/edge_operations.py b/graphiti_core/utils/maintenance/edge_operations.py similarity index 95% rename from core/utils/maintenance/edge_operations.py rename to graphiti_core/utils/maintenance/edge_operations.py index d7a165ac..848f6250 100644 --- a/core/utils/maintenance/edge_operations.py +++ b/graphiti_core/utils/maintenance/edge_operations.py @@ -19,10 +19,10 @@ from time import time from typing import List -from core.edges import EntityEdge, EpisodicEdge -from core.llm_client import LLMClient -from core.nodes import EntityNode, EpisodicNode -from core.prompts import prompt_library +from graphiti_core.edges import EntityEdge, EpisodicEdge +from graphiti_core.llm_client import LLMClient +from graphiti_core.nodes import EntityNode, EpisodicNode +from graphiti_core.prompts import prompt_library logger = logging.getLogger(__name__) diff --git a/core/utils/maintenance/graph_data_operations.py b/graphiti_core/utils/maintenance/graph_data_operations.py similarity index 99% rename from core/utils/maintenance/graph_data_operations.py rename to graphiti_core/utils/maintenance/graph_data_operations.py index ab99b72f..a8274f4b 100644 --- a/core/utils/maintenance/graph_data_operations.py +++ b/graphiti_core/utils/maintenance/graph_data_operations.py @@ -21,7 +21,7 @@ from neo4j import AsyncDriver from typing_extensions import LiteralString -from core.nodes import EpisodicNode +from graphiti_core.nodes import EpisodicNode EPISODE_WINDOW_LEN = 3 diff --git a/core/utils/maintenance/node_operations.py b/graphiti_core/utils/maintenance/node_operations.py similarity index 97% rename from core/utils/maintenance/node_operations.py rename to graphiti_core/utils/maintenance/node_operations.py index 162ab8e5..26619c81 100644 --- a/core/utils/maintenance/node_operations.py +++ b/graphiti_core/utils/maintenance/node_operations.py @@ -18,9 +18,9 @@ from datetime import datetime from time import time -from core.llm_client import LLMClient -from core.nodes import EntityNode, EpisodicNode -from core.prompts import prompt_library +from graphiti_core.llm_client import LLMClient +from graphiti_core.nodes import EntityNode, EpisodicNode +from graphiti_core.prompts import prompt_library logger = logging.getLogger(__name__) diff --git a/core/utils/maintenance/temporal_operations.py b/graphiti_core/utils/maintenance/temporal_operations.py similarity index 97% rename from core/utils/maintenance/temporal_operations.py rename to graphiti_core/utils/maintenance/temporal_operations.py index d8858eba..d47473d9 100644 --- a/core/utils/maintenance/temporal_operations.py +++ b/graphiti_core/utils/maintenance/temporal_operations.py @@ -18,10 +18,10 @@ from datetime import datetime from typing import List -from core.edges import EntityEdge -from core.llm_client import LLMClient -from core.nodes import EntityNode, EpisodicNode -from core.prompts import prompt_library +from graphiti_core.edges import EntityEdge +from graphiti_core.llm_client import LLMClient +from graphiti_core.nodes import EntityNode, EpisodicNode +from graphiti_core.prompts import prompt_library logger = logging.getLogger(__name__) diff --git a/core/utils/maintenance/utils.py b/graphiti_core/utils/maintenance/utils.py similarity index 100% rename from core/utils/maintenance/utils.py rename to graphiti_core/utils/maintenance/utils.py diff --git a/core/utils/utils.py b/graphiti_core/utils/utils.py similarity index 90% rename from core/utils/utils.py rename to graphiti_core/utils/utils.py index 08188b28..4dbdf84f 100644 --- a/core/utils/utils.py +++ b/graphiti_core/utils/utils.py @@ -16,8 +16,8 @@ import logging -from core.edges import EpisodicEdge -from core.nodes import EntityNode, EpisodicNode +from graphiti_core.edges import EpisodicEdge +from graphiti_core.nodes import EntityNode, EpisodicNode logger = logging.getLogger(__name__) diff --git a/poetry.lock b/poetry.lock index 054b3e17..7e3a0428 100644 --- a/poetry.lock +++ b/poetry.lock @@ -225,13 +225,13 @@ testing = ["hatch", "pre-commit", "pytest", "tox"] [[package]] name = "fastapi" -version = "0.112.1" +version = "0.112.2" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = false python-versions = ">=3.8" files = [ - {file = "fastapi-0.112.1-py3-none-any.whl", hash = "sha256:bcbd45817fc2a1cd5da09af66815b84ec0d3d634eb173d1ab468ae3103e183e4"}, - {file = "fastapi-0.112.1.tar.gz", hash = "sha256:b2537146f8c23389a7faa8b03d0bd38d4986e6983874557d95eed2acc46448ef"}, + {file = "fastapi-0.112.2-py3-none-any.whl", hash = "sha256:db84b470bd0e2b1075942231e90e3577e12a903c4dc8696f0d206a7904a7af1c"}, + {file = "fastapi-0.112.2.tar.gz", hash = "sha256:3d4729c038414d5193840706907a41839d839523da6ed0c2811f1168cac1798c"}, ] [package.dependencies] @@ -240,8 +240,8 @@ starlette = ">=0.37.2,<0.39.0" typing-extensions = ">=4.8.0" [package.extras] -all = ["email_validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=2.11.2)", "orjson (>=3.2.1)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.7)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"] -standard = ["email_validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "httpx (>=0.23.0)", "jinja2 (>=2.11.2)", "python-multipart (>=0.0.7)", "uvicorn[standard] (>=0.12.0)"] +all = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=2.11.2)", "orjson (>=3.2.1)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.7)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"] +standard = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.5)", "httpx (>=0.23.0)", "jinja2 (>=2.11.2)", "python-multipart (>=0.0.7)", "uvicorn[standard] (>=0.12.0)"] [[package]] name = "filelock" @@ -390,13 +390,13 @@ typing = ["types-PyYAML", "types-requests", "types-simplejson", "types-toml", "t [[package]] name = "idna" -version = "3.7" +version = "3.8" description = "Internationalized Domain Names in Applications (IDNA)" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" files = [ - {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, - {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, + {file = "idna-3.8-py3-none-any.whl", hash = "sha256:050b4e5baadcd44d760cedbd2b8e639f2ff89bbc7a5730fcc662954303377aac"}, + {file = "idna-3.8.tar.gz", hash = "sha256:d838c2c0ed6fced7693d5e8ab8e734d5f8fda53a039c0164afb0b82e771e3603"}, ] [[package]] @@ -596,38 +596,38 @@ tests = ["pytest (>=4.6)"] [[package]] name = "mypy" -version = "1.11.1" +version = "1.11.2" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" files = [ - {file = "mypy-1.11.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a32fc80b63de4b5b3e65f4be82b4cfa362a46702672aa6a0f443b4689af7008c"}, - {file = "mypy-1.11.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c1952f5ea8a5a959b05ed5f16452fddadbaae48b5d39235ab4c3fc444d5fd411"}, - {file = "mypy-1.11.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e1e30dc3bfa4e157e53c1d17a0dad20f89dc433393e7702b813c10e200843b03"}, - {file = "mypy-1.11.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:2c63350af88f43a66d3dfeeeb8d77af34a4f07d760b9eb3a8697f0386c7590b4"}, - {file = "mypy-1.11.1-cp310-cp310-win_amd64.whl", hash = "sha256:a831671bad47186603872a3abc19634f3011d7f83b083762c942442d51c58d58"}, - {file = "mypy-1.11.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7b6343d338390bb946d449677726edf60102a1c96079b4f002dedff375953fc5"}, - {file = "mypy-1.11.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e4fe9f4e5e521b458d8feb52547f4bade7ef8c93238dfb5bbc790d9ff2d770ca"}, - {file = "mypy-1.11.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:886c9dbecc87b9516eff294541bf7f3655722bf22bb898ee06985cd7269898de"}, - {file = "mypy-1.11.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fca4a60e1dd9fd0193ae0067eaeeb962f2d79e0d9f0f66223a0682f26ffcc809"}, - {file = "mypy-1.11.1-cp311-cp311-win_amd64.whl", hash = "sha256:0bd53faf56de9643336aeea1c925012837432b5faf1701ccca7fde70166ccf72"}, - {file = "mypy-1.11.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f39918a50f74dc5969807dcfaecafa804fa7f90c9d60506835036cc1bc891dc8"}, - {file = "mypy-1.11.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0bc71d1fb27a428139dd78621953effe0d208aed9857cb08d002280b0422003a"}, - {file = "mypy-1.11.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b868d3bcff720dd7217c383474008ddabaf048fad8d78ed948bb4b624870a417"}, - {file = "mypy-1.11.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a707ec1527ffcdd1c784d0924bf5cb15cd7f22683b919668a04d2b9c34549d2e"}, - {file = "mypy-1.11.1-cp312-cp312-win_amd64.whl", hash = "sha256:64f4a90e3ea07f590c5bcf9029035cf0efeae5ba8be511a8caada1a4893f5525"}, - {file = "mypy-1.11.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:749fd3213916f1751fff995fccf20c6195cae941dc968f3aaadf9bb4e430e5a2"}, - {file = "mypy-1.11.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b639dce63a0b19085213ec5fdd8cffd1d81988f47a2dec7100e93564f3e8fb3b"}, - {file = "mypy-1.11.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4c956b49c5d865394d62941b109728c5c596a415e9c5b2be663dd26a1ff07bc0"}, - {file = "mypy-1.11.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:45df906e8b6804ef4b666af29a87ad9f5921aad091c79cc38e12198e220beabd"}, - {file = "mypy-1.11.1-cp38-cp38-win_amd64.whl", hash = "sha256:d44be7551689d9d47b7abc27c71257adfdb53f03880841a5db15ddb22dc63edb"}, - {file = "mypy-1.11.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2684d3f693073ab89d76da8e3921883019ea8a3ec20fa5d8ecca6a2db4c54bbe"}, - {file = "mypy-1.11.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:79c07eb282cb457473add5052b63925e5cc97dfab9812ee65a7c7ab5e3cb551c"}, - {file = "mypy-1.11.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:11965c2f571ded6239977b14deebd3f4c3abd9a92398712d6da3a772974fad69"}, - {file = "mypy-1.11.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a2b43895a0f8154df6519706d9bca8280cda52d3d9d1514b2d9c3e26792a0b74"}, - {file = "mypy-1.11.1-cp39-cp39-win_amd64.whl", hash = "sha256:1a81cf05975fd61aec5ae16501a091cfb9f605dc3e3c878c0da32f250b74760b"}, - {file = "mypy-1.11.1-py3-none-any.whl", hash = "sha256:0624bdb940255d2dd24e829d99a13cfeb72e4e9031f9492148f410ed30bcab54"}, - {file = "mypy-1.11.1.tar.gz", hash = "sha256:f404a0b069709f18bbdb702eb3dcfe51910602995de00bd39cea3050b5772d08"}, + {file = "mypy-1.11.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d42a6dd818ffce7be66cce644f1dff482f1d97c53ca70908dff0b9ddc120b77a"}, + {file = "mypy-1.11.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:801780c56d1cdb896eacd5619a83e427ce436d86a3bdf9112527f24a66618fef"}, + {file = "mypy-1.11.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:41ea707d036a5307ac674ea172875f40c9d55c5394f888b168033177fce47383"}, + {file = "mypy-1.11.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:6e658bd2d20565ea86da7d91331b0eed6d2eee22dc031579e6297f3e12c758c8"}, + {file = "mypy-1.11.2-cp310-cp310-win_amd64.whl", hash = "sha256:478db5f5036817fe45adb7332d927daa62417159d49783041338921dcf646fc7"}, + {file = "mypy-1.11.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:75746e06d5fa1e91bfd5432448d00d34593b52e7e91a187d981d08d1f33d4385"}, + {file = "mypy-1.11.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a976775ab2256aadc6add633d44f100a2517d2388906ec4f13231fafbb0eccca"}, + {file = "mypy-1.11.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cd953f221ac1379050a8a646585a29574488974f79d8082cedef62744f0a0104"}, + {file = "mypy-1.11.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:57555a7715c0a34421013144a33d280e73c08df70f3a18a552938587ce9274f4"}, + {file = "mypy-1.11.2-cp311-cp311-win_amd64.whl", hash = "sha256:36383a4fcbad95f2657642a07ba22ff797de26277158f1cc7bd234821468b1b6"}, + {file = "mypy-1.11.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:e8960dbbbf36906c5c0b7f4fbf2f0c7ffb20f4898e6a879fcf56a41a08b0d318"}, + {file = "mypy-1.11.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:06d26c277962f3fb50e13044674aa10553981ae514288cb7d0a738f495550b36"}, + {file = "mypy-1.11.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6e7184632d89d677973a14d00ae4d03214c8bc301ceefcdaf5c474866814c987"}, + {file = "mypy-1.11.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:3a66169b92452f72117e2da3a576087025449018afc2d8e9bfe5ffab865709ca"}, + {file = "mypy-1.11.2-cp312-cp312-win_amd64.whl", hash = "sha256:969ea3ef09617aff826885a22ece0ddef69d95852cdad2f60c8bb06bf1f71f70"}, + {file = "mypy-1.11.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:37c7fa6121c1cdfcaac97ce3d3b5588e847aa79b580c1e922bb5d5d2902df19b"}, + {file = "mypy-1.11.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4a8a53bc3ffbd161b5b2a4fff2f0f1e23a33b0168f1c0778ec70e1a3d66deb86"}, + {file = "mypy-1.11.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2ff93107f01968ed834f4256bc1fc4475e2fecf6c661260066a985b52741ddce"}, + {file = "mypy-1.11.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:edb91dded4df17eae4537668b23f0ff6baf3707683734b6a818d5b9d0c0c31a1"}, + {file = "mypy-1.11.2-cp38-cp38-win_amd64.whl", hash = "sha256:ee23de8530d99b6db0573c4ef4bd8f39a2a6f9b60655bf7a1357e585a3486f2b"}, + {file = "mypy-1.11.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:801ca29f43d5acce85f8e999b1e431fb479cb02d0e11deb7d2abb56bdaf24fd6"}, + {file = "mypy-1.11.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:af8d155170fcf87a2afb55b35dc1a0ac21df4431e7d96717621962e4b9192e70"}, + {file = "mypy-1.11.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f7821776e5c4286b6a13138cc935e2e9b6fde05e081bdebf5cdb2bb97c9df81d"}, + {file = "mypy-1.11.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:539c570477a96a4e6fb718b8d5c3e0c0eba1f485df13f86d2970c91f0673148d"}, + {file = "mypy-1.11.2-cp39-cp39-win_amd64.whl", hash = "sha256:3f14cd3d386ac4d05c5a39a51b84387403dadbd936e17cb35882134d4f8f0d24"}, + {file = "mypy-1.11.2-py3-none-any.whl", hash = "sha256:b499bc07dbdcd3de92b0a8b29fdf592c111276f6a12fe29c30f6c417dd546d12"}, + {file = "mypy-1.11.2.tar.gz", hash = "sha256:7f9993ad3e0ffdc95c2a14b66dee63729f021968bff8ad911867579c65d13a79"}, ] [package.dependencies] diff --git a/pyproject.toml b/pyproject.toml index 8bbfda5a..6fe4bed7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] -name = "graphiti" +name = "graphiti-core" version = "0.0.1" -description = "Graph building library" +description = "A temporal graph building library" authors = [ "Paul Paliychuk ", "Preston Rasmussen ", @@ -9,6 +9,10 @@ authors = [ readme = "README.md" license = "Apache-2.0" +packages = [ + { include = "graphiti_core", from = "." } +] + [tool.poetry.dependencies] python = "^3.10" pydantic = "^2.8.2" diff --git a/runner.py b/runner.py index 616dbd51..0da690ae 100644 --- a/runner.py +++ b/runner.py @@ -6,8 +6,8 @@ from dotenv import load_dotenv -from core import Graphiti -from core.utils.maintenance.graph_data_operations import clear_data +from graphiti_core import Graphiti +from graphiti_core.utils.maintenance.graph_data_operations import clear_data load_dotenv() diff --git a/tests/tests_int_graphiti.py b/tests/tests_int_graphiti.py index 145b547a..410f72d8 100644 --- a/tests/tests_int_graphiti.py +++ b/tests/tests_int_graphiti.py @@ -9,9 +9,9 @@ from neo4j import AsyncGraphDatabase from openai import OpenAI -from core.edges import EntityEdge, EpisodicEdge -from core.graphiti import Graphiti -from core.nodes import EntityNode, EpisodicNode +from graphiti_core.edges import EntityEdge, EpisodicEdge +from graphiti_core.graphiti import Graphiti +from graphiti_core.nodes import EntityNode, EpisodicNode pytestmark = pytest.mark.integration diff --git a/tests/utils/maintenance/test_temporal_operations.py b/tests/utils/maintenance/test_temporal_operations.py index 88e6b7c2..5323047e 100644 --- a/tests/utils/maintenance/test_temporal_operations.py +++ b/tests/utils/maintenance/test_temporal_operations.py @@ -2,9 +2,9 @@ import pytest -from core.edges import EntityEdge -from core.nodes import EntityNode, EpisodicNode -from core.utils.maintenance.temporal_operations import ( +from graphiti_core.edges import EntityEdge +from graphiti_core.nodes import EntityNode, EpisodicNode +from graphiti_core.utils.maintenance.temporal_operations import ( prepare_edges_for_invalidation, prepare_invalidation_context, ) diff --git a/tests/utils/maintenance/test_temporal_operations_int.py b/tests/utils/maintenance/test_temporal_operations_int.py index 419e1bd2..5836ab70 100644 --- a/tests/utils/maintenance/test_temporal_operations_int.py +++ b/tests/utils/maintenance/test_temporal_operations_int.py @@ -4,10 +4,10 @@ import pytest from dotenv import load_dotenv -from core.edges import EntityEdge -from core.llm_client import LLMConfig, OpenAIClient -from core.nodes import EntityNode, EpisodicNode -from core.utils.maintenance.temporal_operations import ( +from graphiti_core.edges import EntityEdge +from graphiti_core.llm_client import LLMConfig, OpenAIClient +from graphiti_core.nodes import EntityNode, EpisodicNode +from graphiti_core.utils.maintenance.temporal_operations import ( invalidate_edges, )