semantica.export serializes knowledge graphs to every downstream format:
  • RDF: Turtle, JSON-LD, N-Triples, RDF/XML: with optional W3C PROV-O provenance inline
  • Analytics: Apache Parquet and Arrow for Spark, BigQuery, Databricks
  • Graph databases: Cypher CREATE statements for Neo4j; AQL INSERT for ArangoDB
  • Standard formats: GraphML, GEXF, Graphviz DOT, CSV, OWL 2.0
  • Vector export: NumPy .npz, FAISS index, binary for embedding pipelines

Exported Classes

Getting Started

Or use the one-liner convenience functions:

Quick Export

1

Export to RDF string

2

Write RDF directly to file

3

Columnar export for analytics

4

Graph database import

Exporters

Export to W3C RDF formats: Turtle, JSON-LD, N-Triples, and RDF/XML.export_to_rdf() returns a string; export() writes to a file:
export_to_rdf() returns a string: it does not write a file. Call export() or export_knowledge_graph() to write directly to disk.
Use export_to_rdf() + string for inspection, export() for production. In notebooks or debug sessions, export_to_rdf() is handy for quick inspection. For CI pipelines and pipelines writing files, export() is a single call.
Use turtle for human readability, ntriples for streaming. Turtle is compact and readable for debugging and sharing. N-Triples (.nt) is line-oriented: one triple per line: making it safe to stream, concatenate, and process with standard Unix tools.
Namespace management:
Temporal export (OWL-Time):

Convenience Functions

The export_csv convenience function delegates to CSVExporter.export(). For per-type exports use the class directly (exporter.export_entities(), exporter.export_relationships()).

Format Reference

Match your export format to your consumer. Neo4j → cypher; ArangoDB → aql; Gephi/yEd → graphml or gexf; semantic web tools → turtle or json-ld; analytics pipelines → parquet; zero-copy IPC → arrow.
  • Triplet Store — Store RDF exports in a SPARQL-queryable backend.
  • Ontology — Export OWL ontologies.
  • Provenance — Include provenance metadata in RDF exports.
  • Pipeline — Add export as a final pipeline step.