
Security News
The Nightmare Before Deployment
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.
graflo
Advanced tools
A framework for transforming tabular (CSV, SQL) and hierarchical data (JSON, XML) into property graphs and ingesting them into graph databases (ArangoDB, Neo4j)
A framework for transforming tabular (CSV, SQL) and hierarchical data (JSON, XML) into property graphs and ingesting them into graph databases (ArangoDB, Neo4j, TigerGraph).
⚠️ Package Renamed: This package was formerly known as
graphcast.
graflo works with property graphs, which consist of:
The Schema defines how your data should be transformed into a graph and contains:
Field objects with types (INT, FLOAT, STRING, DATETIME, BOOL)Resources are your data sources that can be:
Full documentation is available at: growgraph.github.io/graflo
pip install graflo
from suthing import FileHandle
from graflo import Schema, Caster, Patterns
from graflo.db.connection.onto import ArangoConfig
schema = Schema.from_dict(FileHandle.load("schema.yaml"))
# Option 1: Load config from docker/arango/.env (recommended)
conn_conf = ArangoConfig.from_docker_env()
# Option 2: Load from environment variables
# Set: ARANGO_URI, ARANGO_USERNAME, ARANGO_PASSWORD, ARANGO_DATABASE
conn_conf = ArangoConfig.from_env()
# Option 3: Load with custom prefix (for multiple configs)
# Set: USER_ARANGO_URI, USER_ARANGO_USERNAME, USER_ARANGO_PASSWORD, USER_ARANGO_DATABASE
user_conn_conf = ArangoConfig.from_env(prefix="USER")
# Option 4: Create config directly
# conn_conf = ArangoConfig(
# uri="http://localhost:8535",
# username="root",
# password="123",
# database="mygraph", # For ArangoDB, 'database' maps to schema/graph
# )
# Note: If 'database' (or 'schema_name' for TigerGraph) is not set,
# Caster will automatically use Schema.general.name as fallback
from graflo.util.onto import FilePattern
import pathlib
# Create Patterns with file patterns
patterns = Patterns()
patterns.add_file_pattern(
"work",
FilePattern(regex="\Sjson$", sub_path=pathlib.Path("./data"), resource_name="work")
)
# Or use resource_mapping for simpler initialization
# patterns = Patterns(
# _resource_mapping={
# "work": "./data/work.json",
# }
# )
schema.fetch_resource()
caster = Caster(schema)
caster.ingest(
output_config=conn_conf, # Target database config
patterns=patterns, # Source data patterns
)
from graflo.db.postgres import PostgresConnection
from graflo.db.postgres.heuristics import infer_schema_from_postgres
from graflo.db.connection.onto import PostgresConfig
from graflo import Caster
from graflo.onto import DBFlavor
# Connect to PostgreSQL
postgres_config = PostgresConfig.from_docker_env() # or PostgresConfig.from_env()
postgres_conn = PostgresConnection(postgres_config)
# Infer schema from PostgreSQL 3NF database
schema = infer_schema_from_postgres(
postgres_conn,
schema_name="public", # PostgreSQL schema name
db_flavor=DBFlavor.ARANGO # Target graph database flavor
)
# Close PostgreSQL connection
postgres_conn.close()
# Use the inferred schema with Caster
caster = Caster(schema)
# ... continue with ingestion
To install requirements
git clone git@github.com:growgraph/graflo.git && cd graflo
uv sync --dev
Spin up Arango from arango docker folder by
docker-compose --env-file .env up arango
Neo4j from neo4j docker folder by
docker-compose --env-file .env up neo4j
and TigerGraph from tigergraph docker folder by
docker-compose --env-file .env up tigergraph
To run unit tests
pytest test
Contributions are welcome! Please feel free to submit a Pull Request.
FAQs
A framework for transforming tabular (CSV, SQL) and hierarchical data (JSON, XML) into property graphs and ingesting them into graph databases (ArangoDB, Neo4j)
We found that graflo demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.

Research
/Security News
Impostor NuGet package Tracer.Fody.NLog typosquats Tracer.Fody and its author, using homoglyph tricks, and exfiltrates Stratis wallet JSON/passwords to a Russian IP address.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.