connectpak-graph-memgraph 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ """Memgraph connector for connectpak."""
2
+
3
+ from connectpak.graph.memgraph.connector import MemgraphConnector
4
+
5
+ __all__ = ["MemgraphConnector"]
@@ -0,0 +1,41 @@
1
+ """CLI entry point for the Memgraph connector."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import argparse
6
+ import os
7
+ import sys
8
+
9
+ from connectpak.core.server import serve
10
+ from connectpak.graph.memgraph.connector import MemgraphConnector
11
+
12
+
13
+ def main() -> int:
14
+ parser = argparse.ArgumentParser(prog="connectpak-graph-memgraph")
15
+ parser.add_argument(
16
+ "--config",
17
+ default=os.environ.get("CONNECTPAK_MEMGRAPH_URI"),
18
+ help="Memgraph connection config (default: $CONNECTPAK_MEMGRAPH_URI). "
19
+ "See the connector's docstring for accepted formats.",
20
+ )
21
+ parser.add_argument("--allow-write", action="store_true")
22
+ parser.add_argument("--statement-timeout-ms", type=int, default=30_000)
23
+ parser.add_argument("--max-rows", type=int, default=1000)
24
+ args = parser.parse_args()
25
+ if not args.config:
26
+ print(
27
+ "error: --config is required (or set $CONNECTPAK_MEMGRAPH_URI)",
28
+ file=sys.stderr,
29
+ )
30
+ return 2
31
+ serve(MemgraphConnector(
32
+ config=args.config,
33
+ allow_write=args.allow_write,
34
+ statement_timeout_ms=args.statement_timeout_ms,
35
+ default_max_rows=args.max_rows,
36
+ ))
37
+ return 0
38
+
39
+
40
+ if __name__ == "__main__":
41
+ raise SystemExit(main())
@@ -0,0 +1,16 @@
1
+ """Memgraph connector.
2
+
3
+ Memgraph speaks the Bolt protocol and most of Cypher, so this is a thin
4
+ subclass of `Neo4jConnector`. The default Bolt port is 7687, the same as
5
+ Neo4j; pass the URI in `config`.
6
+
7
+ Config: bolt://user:pass@host:7687
8
+ """
9
+
10
+ from __future__ import annotations
11
+
12
+ from connectpak.graph.neo4j.connector import Neo4jConnector
13
+
14
+
15
+ class MemgraphConnector(Neo4jConnector):
16
+ name = "memgraph"
@@ -0,0 +1,26 @@
1
+ Metadata-Version: 2.5
2
+ Name: connectpak-graph-memgraph
3
+ Version: 0.1.0
4
+ Summary: Memgraph connector for connectpak.
5
+ License: MIT
6
+ Requires-Python: >=3.11
7
+ Requires-Dist: connectpak-core
8
+ Requires-Dist: connectpak-graph-neo4j
9
+ Requires-Dist: neo4j>=5.20
10
+ Description-Content-Type: text/markdown
11
+
12
+ # connectpak-graph-memgraph
13
+
14
+ Memgraph connector for connectpak.
15
+
16
+ ## Quick start
17
+
18
+ ```bash
19
+ uv sync
20
+ export CONNECTPAK_MEMGRAPH_URI="..."
21
+ uv run connectpak-graph-memgraph
22
+ ```
23
+
24
+ See the connector module docstring for the accepted config / DSN format and
25
+ for any engine-specific safety notes (engine-level read-only mode, statement
26
+ timeout mechanism, query language for the `query` tool).
@@ -0,0 +1,7 @@
1
+ connectpak/graph/memgraph/__init__.py,sha256=yZYKySJbjkcXaBPYCK3VxG1_HNeLYi0c_VaThK5Efk8,141
2
+ connectpak/graph/memgraph/__main__.py,sha256=KU57363jh6BBkZtg8kFbdK2pf5CzW9eQyLirTsf6wTQ,1254
3
+ connectpak/graph/memgraph/connector.py,sha256=4Fzc1uAN0Lgt2YXFbon8ijhHy4F5EfNRBVHUT56AVUc,404
4
+ connectpak_graph_memgraph-0.1.0.dist-info/METADATA,sha256=89WfQT2Gca7H-0mwSLqkjCH0MvRlMLGDF6hUDkjPTgY,669
5
+ connectpak_graph_memgraph-0.1.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
6
+ connectpak_graph_memgraph-0.1.0.dist-info/entry_points.txt,sha256=NoN40Wn5iAiSPuEe26oj9OaFq13kiPAJbCFeTBSbklA,86
7
+ connectpak_graph_memgraph-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.33.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ connectpak-graph-memgraph = connectpak.graph.memgraph.__main__:main