API Reference¶
This section provides detailed API documentation for all graflo components and modules.
The per-module pages below are generated at build time from the source tree
by docs/_build/gen_pages.py, which walks graflo/**/*.py and renders an
mkdocstrings page for each module. Nothing under reference/ needs to be
written by hand, and a hand-written page at a module's path is inert -- the
generator replaces it before anything renders. To document a module, add
docstrings to it.
This page and the two section overviews (data_source/, rdf/) are the
exceptions. An overview at reference/<pkg>/index.md shares a URL with the
generated package page, so the generator skips any package whose overview
exists on disk — which means an overview must carry its own graflo.<pkg>
block to document the package itself.
Architecture¶
Core architectural components that define the graflo framework:
- Schema: Graph schema definition and management
- GraphManifest: Canonical top-level config contract
- Vertex: Vertex configuration and properties
- Edge: Edge configuration and relationship management
- Resource: Data source mapping and transformation
- Actor: Document processing pipeline (runtime)
- Transform: Transform definitions (
Transform,ProtoTransform) - Pipeline runtime: Executor and assembly
- Graph types: Runtime graph structures (contexts, containers, indexes)
- Utilities: Common utility functions
Database Operations¶
Database connection and management components:
- Connection Manager: Database connection lifecycle management
- ArangoDB:
- Connection: ArangoDB-specific connection implementation
- Query: AQL query execution and utilities
- Utilities: ArangoDB-specific utility functions
- Neo4j:
- Connection: Neo4j-specific connection implementation
- Cypher helpers — Shared Cypher utilities (escape, relationship MERGE)
- FalkorDB:
- Connection: FalkorDB-specific connection implementation
- TigerGraph:
- Connection: TigerGraph-specific connection implementation with REST++ API and GSQL support
- NebulaGraph:
- Connection: NebulaGraph connection implementation with dual v3.x/v5.x support
- Adapter: Version-agnostic client adapter layer (v3 Thrift, v5 gRPC)
- Query: nGQL and GQL query builders
- Utilities: Type mapping, value serialization, VID generation, filter rendering
- PostgreSQL:
- Connection: PostgreSQL connection, SQL schema introspection (3NF source), and graph target writes (vertex + junction edge tables)
- Schema Inference: Automatic schema generation from PostgreSQL 3NF databases
- Resource Mapping: Mapping PostgreSQL tables to graflo Resources
- Type Mapping: PostgreSQL to graflo type conversion
RDF¶
Manifest serialization and domain ontology inference:
- Manifest ↔ RDF (
graflo.rdf):ManifestRdfSerializer,ManifestRdfDeserializer, GraFlo meta-ontology - RDF inference (
RdfInferenceManager): User OWL/RDFS TBox → GraFloSchema+ ingestion
Core Components¶
Main graflo functionality:
- Caster: Main data ingestion and transformation engine
- Ingestion parameters:
IngestionParams, row-error policy types, and batch cast results (CastBatchResult, …) — see also the Parallelism concept page for how the concurrency knobs interact - Data Sources: Data source abstraction layer (files, APIs, SQL, Kafka, in-memory)
- Ontology: Core data types and enums
Utilities¶
Helper modules and utilities:
- Chunker: Data chunking and batching utilities
- Merge: Data merging and deduplication
- Transform: Data transformation utilities
- Miscellaneous: Other utility functions
Filtering¶
Data filtering and query capabilities:
- Ontology: Filter expression system and operators
Visualization¶
Graph visualization and plotting:
- Plotter: Graph visualization and schema plotting utilities
Command Line Interface¶
The graflo command groups every verb; each is also installed as its own
console script, so graflo ingest ... and ingest ... are the same code.
graflo: the umbrella group- Version control:
commit,log,verify,checkout,merge,revert,stamp(see Version control) - Ingest: Data ingestion commands
- Schema migration: plan and execute changes against a database
- Manifest ↔ RDF:
manifest-to-rdf,rdf-to-manifest(see GraFlo ontology) - Database Management: Database administration commands
- Schema Visualization: Schema visualization commands
- XML to JSON: XML data conversion utilities
Getting Started¶
Contributing¶
For information on contributing to graflo, see the Contributing Guide.