graflo.db.conn¶
Abstract database connection interface for graph databases.
This module defines the abstract interface for database connections, providing a unified API for different graph database implementations. It includes methods for database management, graph structure operations, and data manipulation.
Key Components:
- Connection: Abstract base class for database connections
- ConnectionType: Type variable for connection implementations
The connection interface supports:
- Database/Graph creation and deletion
- Graph structure management (vertex types, edge types)
- Index definition
- Document operations (insert, update, fetch)
- Edge operations
- Aggregation queries
Database Organization Terminology
Different databases organize graph data differently:
-
ArangoDB:
- Database: Top-level container (like a schema)
- Collections (ArangoDB-specific): Container for vertices (vertex collections)
- Edge Collections (ArangoDB-specific): Container for edges
- Graph: Named graph that connects vertex and edge collections
-
Neo4j:
- Database: Top-level container
- Labels: Categories for nodes (equivalent to vertex types)
- Relationship Types: Types of relationships (equivalent to edge types)
- No explicit "graph" concept - all nodes/relationships are in the database
-
TigerGraph:
- Graph: Top-level container (functions like a database in ArangoDB)
- Vertex Types: Global vertex type definitions (can be shared across graphs)
- Edge Types: Global edge type definitions (can be shared across graphs)
- Vertex and edge types are associated with graphs
When using the Connection interface, the terms "vertex type" and "edge type" are used generically to refer to the appropriate concept in each database.
Example
class MyConnection(Connection): ... def create_database(self, name: str): ... # Implementation ... def execute(self, query, **kwargs): ... # Implementation
Connection
¶
Bases: ABC
Abstract base class for database connections.
This class defines the interface that all database connection implementations must follow. It provides methods for database/graph operations, graph structure management (vertex types, edge types), and data manipulation.
Note
All methods marked with @abc.abstractmethod must be implemented by
concrete connection classes. Subclasses must set the class attribute
flavor to their DBType.
Source code in graflo/db/conn.py
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 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 | |
__init__()
¶
aggregate(class_name, aggregation_function, discriminant=None, aggregated_field=None, filters=None)
abstractmethod
¶
Perform aggregation on a collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
class_name
|
str
|
Name of the collection |
required |
aggregation_function
|
AggregationType
|
Type of aggregation to perform |
required |
discriminant
|
str | None
|
Field to group by |
None
|
aggregated_field
|
str | None
|
Field to aggregate |
None
|
filters
|
FilterExpression | list[Any] | dict[str, Any] | None
|
Query filters. Accepts a built |
None
|
Returns:
| Type | Description |
|---|---|
int | float | list[dict[str, Any]] | dict[str, int | float] | None
|
Aggregation results (type depends on aggregation function) |
Source code in graflo/db/conn.py
apply_target_schema(schema, *, recreate, create_namespace=True)
abstractmethod
¶
Define vertex/edge schema artifacts and indexes (op 2).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schema
|
Schema
|
Schema to apply. |
required |
recreate
|
bool
|
If True, drop existing schema artifacts before defining. If False and artifacts already exist, raises SchemaExistsError. |
required |
create_namespace
|
bool
|
Whether namespace creation is allowed. Backends use this during recreate to decide if the graph/db shell may be dropped. |
True
|
Source code in graflo/db/conn.py
bulk_load_append(session_id, gc, schema)
¶
Append one cast batch to the active bulk-load session.
Source code in graflo/db/conn.py
bulk_load_begin(schema, bulk_cfg)
¶
Start a native bulk-load session (CSV staging + LOADING JOB).
Raises:
| Type | Description |
|---|---|
UnsupportedBulkLoad
|
For backends that only support REST/document APIs. |
Source code in graflo/db/conn.py
bulk_load_finalize(session_id, schema, *, bindings=None, connection_provider=None)
¶
Close staging files, optionally upload to S3, run LOADING JOB, return GSQL log text.
Source code in graflo/db/conn.py
clear_data(schema)
abstractmethod
¶
Remove all data from the graph without dropping or changing the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schema
|
Schema
|
Schema describing the graph (used to identify collections/labels). |
required |
close()
abstractmethod
¶
create_database(name)
abstractmethod
¶
Create a new database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the database to create |
required |
define_edge_classes(edges)
¶
Define edge classes based on edge configurations.
This method is called from define_schema() to create edge types/collections.
Default implementation is a no-op. Override in subclasses as needed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
edges
|
list[Edge]
|
List of edge configurations to create |
required |
Source code in graflo/db/conn.py
define_edge_indexes(edges, schema=None)
abstractmethod
¶
Define indexes for edge classes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
edges
|
list[Edge]
|
List of edge configurations containing index definitions |
required |
define_indexes(schema)
¶
Define indexes for vertices and edges in the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schema
|
Schema
|
Schema containing vertex and edge configurations |
required |
Source code in graflo/db/conn.py
define_schema(schema)
abstractmethod
¶
Define vertex and edge classes based on the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schema
|
Schema
|
Schema containing vertex and edge class definitions |
required |
define_vertex_classes(schema)
¶
Define vertex classes based on schema.
This method is called from define_schema() to create vertex types/collections. Most implementations take a Schema. Some implementations (like TigerGraph) may override with a more specific signature (VertexConfig).
Default implementation is a no-op. Override in subclasses as needed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schema
|
Schema
|
Schema containing vertex definitions |
required |
Source code in graflo/db/conn.py
define_vertex_indexes(vertex_config, schema=None)
abstractmethod
¶
Define indexes for vertex classes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vertex_config
|
VertexConfig
|
Vertex configuration containing index definitions |
required |
delete_database(name)
abstractmethod
¶
delete_graph_structure(vertex_types=(), graph_names=(), delete_all=False)
abstractmethod
¶
Delete graph structure (graphs, vertex types, edge types) from the database.
This method deletes graphs and their associated vertex/edge types. The exact behavior depends on the database implementation:
- ArangoDB: Deletes graphs and collections (vertex/edge collections)
- Neo4j: Deletes nodes from labels (vertex types) and relationships
- TigerGraph: Deletes graphs, vertex types, edge types, and jobs
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vertex_types
|
tuple[str, ...] | list[str]
|
Vertex type names to delete (database-specific interpretation) |
()
|
graph_names
|
tuple[str, ...] | list[str]
|
Graph/database names to delete |
()
|
delete_all
|
bool
|
If True, delete all targeted graph structures. This is destructive and should only be used with explicit intent. |
False
|
Source code in graflo/db/conn.py
edge_direction_diagnostics(schema)
¶
How this backend will treat each logically undirected edge in schema.
Returned as data, not just logged, so an API or UI can surface it —
Edge.directed is authored far from where its consequences land, and
a log line reaches nobody driving GraFlo over HTTP. Empty when the
schema declares no undirected edges, or when the backend represents them
natively. See :mod:graflo.db.edge_direction_support.
Source code in graflo/db/conn.py
ensure_target_namespace(schema, *, create)
abstractmethod
¶
Ensure the target graph/database/space namespace exists (op 1).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schema
|
Schema
|
Schema whose metadata/config resolves the namespace name. |
required |
create
|
bool
|
If True, create the namespace when missing (idempotent where supported). If False, require an existing namespace or raise NamespaceNotFoundError. |
required |
Source code in graflo/db/conn.py
execute(query, **kwargs)
abstractmethod
¶
Execute a database query.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
str | Any
|
Query to execute |
required |
**kwargs
|
Any
|
Additional query parameters |
{}
|
Returns:
| Type | Description |
|---|---|
Any
|
Query result (database-specific) |
expression_flavor()
classmethod
¶
Expression flavor for filter rendering (AQL, CYPHER, GSQL).
Graph connection subclasses must set class attribute flavor to a
DBType present in DB_TYPE_TO_EXPRESSION_FLAVOR.
Source code in graflo/db/conn.py
fetch_all_docs(class_name, *, limit=None)
¶
Fetch all documents for a vertex type/collection.
Source code in graflo/db/conn.py
fetch_all_edges(source_class, target_class, relation_name, *, match_keys_source=None, match_keys_target=None, limit=None, collection_name=None)
¶
Fetch all edges between two vertex types.
Returns:
| Type | Description |
|---|---|
list[list[dict[str, Any]]]
|
List of |
Source code in graflo/db/conn.py
fetch_docs(class_name, filters=None, limit=None, return_keys=None, unset_keys=None, **kwargs)
abstractmethod
¶
Fetch documents from a vertex type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
class_name
|
str
|
Name of the vertex type (or collection/label in database-specific terms) |
required |
filters
|
list[Any] | dict[str, Any] | None
|
Query filters |
None
|
limit
|
int | None
|
Maximum number of documents to return |
None
|
return_keys
|
list[str] | None
|
Keys to return |
None
|
unset_keys
|
list[str] | None
|
Keys to unset |
None
|
**kwargs
|
Any
|
Additional database-specific parameters (e.g., field_types for TigerGraph) |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
list |
list[dict[str, Any]]
|
Fetched documents |
Source code in graflo/db/conn.py
fetch_edges(from_type, from_id, edge_type=None, to_type=None, to_id=None, filters=None, limit=None, return_keys=None, unset_keys=None, direction=EdgeDirection.OUT, **kwargs)
abstractmethod
¶
Fetch edges incident to one vertex.
from_type / from_id name the anchor vertex; direction
decides which orientations are followed from it, and to_type /
to_id constrain the vertex at the other end — whichever end that
is. For a logically undirected edge the correct value is
:attr:EdgeDirection.ANY; :func:~graflo.db.edge_direction_support.default_direction_for_edge
derives it from the schema edge.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
from_type
|
str
|
Anchor vertex type |
required |
from_id
|
str
|
Anchor vertex ID (required) |
required |
edge_type
|
str | None
|
Optional edge type to filter by |
None
|
to_type
|
str | None
|
Optional vertex type of the other endpoint |
None
|
to_id
|
str | None
|
Optional vertex ID of the other endpoint |
None
|
filters
|
list[Any] | dict[str, Any] | None
|
Additional query filters |
None
|
limit
|
int | None
|
Maximum number of edges to return |
None
|
return_keys
|
list[str] | None
|
Keys to return (projection) |
None
|
unset_keys
|
list[str] | None
|
Keys to exclude (projection) |
None
|
direction
|
EdgeDirection
|
Orientations to follow from the anchor. Defaults to
:attr: |
OUT
|
**kwargs
|
Any
|
Additional database-specific parameters |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
list |
list[dict[str, Any]]
|
List of fetched edges |
Raises:
| Type | Description |
|---|---|
UnsupportedEdgeDirectionError
|
if the backend cannot follow the edge in the requested direction (TigerGraph without a reverse type). |
Source code in graflo/db/conn.py
fetch_present_documents(batch, class_name, match_keys, keep_keys=None, flatten=False, filters=None)
abstractmethod
¶
Fetch documents that exist in the database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
batch
|
list[dict[str, Any]]
|
Batch of documents to check |
required |
class_name
|
str
|
Name of the collection |
required |
match_keys
|
list[str] | tuple[str, ...]
|
Keys to match |
required |
keep_keys
|
list[str] | tuple[str, ...] | None
|
Keys to keep in result |
None
|
flatten
|
bool
|
Whether to flatten the result. If True, returns a flat list. If False, returns a dict mapping batch indices to matching documents. |
False
|
filters
|
list[Any] | dict[str, Any] | None
|
Additional query filters |
None
|
Returns:
| Type | Description |
|---|---|
list[dict[str, Any]] | dict[int, list[dict[str, Any]]]
|
list | dict: Documents that exist in the database. Returns a list if flatten=True, otherwise returns a dict mapping batch indices to documents. |
Source code in graflo/db/conn.py
graph_neighbors(vertex_type, key, *, hops=1, direction=EdgeDirection.OUT, edge_types=None, filters=None, limit=None, schema=None)
¶
Bounded neighbourhood around one anchor vertex.
Returns a :class:~graflo.architecture.graph_types.container.GraphContainer
so every backend answers in the same shape — the point of the whole read
path being DB-agnostic.
The default is a breadth-first composition of :meth:fetch_edges and
:meth:fetch_docs, which gives correct multi-hop semantics on any
backend that can answer a single hop. Backends with a native multi-hop
form (AQL 1..k, Cypher variable-length, nGQL GO … STEPS) override
this for a single round trip; the conformance suite asserts the override
returns exactly what the default would.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vertex_type
|
str
|
Logical type of the anchor vertex. |
required |
key
|
str | dict[str, Any]
|
Anchor's identity — a raw id, or a field mapping to resolve. |
required |
hops
|
int
|
Maximum hop distance. Must be >= 1. |
1
|
direction
|
EdgeDirection
|
Orientations followed from the anchor. Edges declared
|
OUT
|
edge_types
|
Sequence[str] | None
|
Restrict traversal to these logical relation names. |
None
|
filters
|
Any | None
|
Optional |
None
|
limit
|
int | None
|
Maximum edges to accumulate. |
None
|
schema
|
Schema | None
|
Schema used for logical -> storage name resolution. Required for anything but the simplest single-collection graphs. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
GraphContainer |
GraphContainer
|
vertices and edges reached, deduplicated. |
Raises:
| Type | Description |
|---|---|
UnsupportedEdgeDirectionError
|
if the backend cannot follow an edge in the requested direction (TigerGraph without a reverse type). |
Source code in graflo/db/conn.py
init_db(schema, recreate_schema=False, *, create_namespace=True)
¶
Convenience wrapper: ensure namespace then apply schema.
Prefer calling ensure_target_namespace and apply_target_schema directly.
Source code in graflo/db/conn.py
insert_edges_batch(docs_edges, source_class, target_class, relation_name, match_keys_source, match_keys_target, filter_uniques=True, head=None, **kwargs)
abstractmethod
¶
Insert a batch of edges.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
docs_edges
|
list[list[dict[str, Any]]] | list[Any] | None
|
Edge documents to insert |
required |
source_class
|
str
|
Source vertex type/class |
required |
target_class
|
str
|
Target vertex type/class |
required |
relation_name
|
str
|
Name of the edge type/relation |
required |
match_keys_source
|
tuple[str, ...]
|
Keys to match source vertices |
required |
match_keys_target
|
tuple[str, ...]
|
Keys to match target vertices |
required |
filter_uniques
|
bool
|
Whether to filter unique edges |
True
|
head
|
int | None
|
Optional limit on number of edges to insert |
None
|
**kwargs
|
Any
|
Additional insertion parameters (see also
:func: |
{}
|
Source code in graflo/db/conn.py
insert_return_batch(docs, class_name)
abstractmethod
¶
Insert documents and return the inserted documents.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
docs
|
list[dict[str, Any]]
|
Documents to insert |
required |
class_name
|
str
|
Name of the vertex type (or collection/label in database-specific terms) |
required |
Returns:
| Type | Description |
|---|---|
list[dict[str, Any]] | str
|
list | str: Inserted documents, or a query string (database-specific behavior). Most implementations return a list of inserted documents. ArangoDB returns an AQL query string for deferred execution. |
Source code in graflo/db/conn.py
introspect_graph_schema(schema_name=None, *, sample_limit=100)
¶
Infer a graflo :class:Schema from this graph database.
Graph connection subclasses implement sampling-based introspection.
Source code in graflo/db/conn.py
keep_absent_documents(batch, class_name, match_keys, keep_keys=None, filters=None)
abstractmethod
¶
Keep documents that don't exist in the database.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
batch
|
list[dict[str, Any]]
|
Batch of documents to check |
required |
class_name
|
str
|
Name of the collection |
required |
match_keys
|
list[str] | tuple[str, ...]
|
Keys to match |
required |
keep_keys
|
list[str] | tuple[str, ...] | None
|
Keys to keep in result |
None
|
filters
|
list[Any] | dict[str, Any] | None
|
Additional query filters |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
list |
list[dict[str, Any]]
|
Documents that don't exist in the database |
Source code in graflo/db/conn.py
report_edge_direction_support(schema)
¶
Log :meth:edge_direction_diagnostics once per distinct edge.
Backends call this from :meth:apply_target_schema, which runs on every
define/recreate; the diagnostics are a static property of the schema and
the target, so repeating them each time is noise.
Source code in graflo/db/conn.py
resolve_vertices(class_name, key_docs, match_keys, return_keys, *, chunk_size=DEFAULT_RESOLVE_CHUNK_SIZE)
¶
Locate vertices by an arbitrary field-set, preserving multiplicity.
Used to attach edge endpoints declared by a secondary identity: the caller passes documents carrying the secondary fields and gets back the matching vertices projected onto return_keys (the primary identity), so the edge write itself stays a plain primary-key operation.
Unlike :meth:fetch_present_documents, every match is returned rather
than the first, because the caller's ambiguity policy needs the count.
This default implementation issues one filtered
:meth:fetch_docs per chunk of distinct keys and works on any backend
whose fetch_docs honours filters. Backends override it where a
cheaper or more expressive lookup exists.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
class_name
|
str
|
Storage name of the vertex type to search |
required |
key_docs
|
list[dict[str, Any]]
|
Documents carrying values for match_keys |
required |
match_keys
|
tuple[str, ...]
|
Field-set to match on (the secondary identity) |
required |
return_keys
|
tuple[str, ...]
|
Fields to project onto the matched vertices |
required |
chunk_size
|
int
|
Distinct keys per lookup query |
DEFAULT_RESOLVE_CHUNK_SIZE
|
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict[int, list[dict[str, Any]]]
|
Position in key_docs -> every vertex it matched. Positions with an unresolvable (partial) key or no match are absent. |
Source code in graflo/db/conn.py
traverse(query, *, schema)
¶
Answer a :class:~graflo.architecture.query.TraverseQuery.
The multi-seed form of :meth:graph_neighbors. Seeds are walked in
order and merged into one container, so a vertex reachable from several
seeds appears once.
The query is not validated here. Cap enforcement belongs to the surface that accepted the request, before any connection is opened — validating again at the driver would make the ordering ambiguous and invite a caller to skip the earlier check.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
Any
|
A |
required |
schema
|
Schema
|
Required, for logical -> storage name resolution. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
GraphContainer |
GraphContainer
|
everything reached from any seed, deduplicated. |
Source code in graflo/db/conn.py
upsert_docs_batch(docs, class_name, match_keys, **kwargs)
abstractmethod
¶
Upsert a batch of documents.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
docs
|
list[dict[str, Any]]
|
Documents to upsert |
required |
class_name
|
str
|
Name of the vertex type (or collection/label in database-specific terms) |
required |
match_keys
|
list[str] | tuple[str, ...]
|
Keys to match for upsert |
required |
**kwargs
|
Any
|
Additional upsert parameters |
{}
|
Source code in graflo/db/conn.py
ConnectionCapability
¶
Bases: Enum
A capability a caller needs from a connection, by ClassVar name.
Values are the attribute names on :class:Connection so that opening a
connection for a purpose and declaring support for that purpose cannot drift
apart -- there is one name, not a flag and a matching-by-convention check.
Source code in graflo/db/conn.py
label
property
¶
Human-readable name, for error messages.
InsertEdgesKwArgs
dataclass
¶
Keyword arguments shared by :meth:Connection.insert_edges_batch implementations.
Source code in graflo/db/conn.py
NamespaceNotFoundError
¶
SchemaExistsError
¶
Bases: RuntimeError
Raised when schema artifacts already exist and recreate is False.
Set recreate=True in apply_target_schema (or recreate_schema=True in init_db) to replace the existing schema, or use clear_data=True before ingestion to only clear data without touching the schema.
Source code in graflo/db/conn.py
consume_insert_edges_kwargs(kwargs)
¶
Pop standard insert_edges_batch keys from kwargs and warn on unknown keys.
Mutates kwargs in place (removes consumed keys). Callers should not pass
additional keyword arguments beyond those documented on
:meth:Connection.insert_edges_batch.