Skip to main content

Goblinoid

Convert Goblin OGM to JanusGraph schema.

This tool provides an automated way to keep your graph database schema in sync with Goblin OGM (Object Graph Mapper). Once you define your schema using Goblin’s Vertex and Edge classes you can simply pass sources to Goblinoid that will automatically create a groovy script you can run to create your graph database schema.

Installation

You can simply install Goblinoid from PyPI:

$ pip3 install goblinoid

Once your Goblinoid is installed you can access its CLI using:

$ goblinoid --help

Usage - Schema creation

Goblinoid allows you to automatically create schema based on models defined in your source code. To automatically generate schema definition, you need to point Goblinoid to the correct module of your application that holds all defined models for your application:

$ goblinoid-cli --module-import 'myapp.graph.models' --models-iterable 'ALL_MODELS' --schema-file schema.groovy

It’s important to state that your package/module is importable for the CLI (you might want to adjust PYTHONPATH to accomplish that in some cases). Goblinoid automatically creates a Groovy script that you can run to create schema.

It is recommended to also provide the --schema-vertex-identifier option. In that case Goblinoid automatically creates a vertex with label goblinoid_schema_meta that holds provided identifier and datetime when the schema creation was performed. This allows you to keep graph metadata for later debugging or ensuring your services that communicate with the graph instance use required schema version.

By default, Goblinoid disables JanusGraph’s schema maker. It is recommended having the schema maker disabled so all vertexes and edges that are added to the graph database respect the provided schema and there are not created additional schema entries. You can avoid this behaviour by specifying the --keep-schema-maker flag. See the official documentation for more info.

Release files for goblinoid 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for goblinoid 0.1.0
File Size Uploaded
goblinoid-0.1.0.tar.gz 6.8 kB Details

Release files / goblinoid-0.1.0.tar.gz

Download URL goblinoid-0.1.0.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
089f617206252a51c28287d92eb30549a13b2d41f34511dcc450a0414531ba3d
BLAKE2b-256 checksum
How to use checksums
8603238626336c383569372b85f68b035fb62b4812c8775f2d0c1d87995029f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file

0.0.1

1 release file

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page