Skip to content

Graphite Module-Level Reference

This document provides the API reference for objects available directly from the graphite module.

All items described here can be accessed after importing the module:

import graphite

graphite

Graphite: A clean, embedded graph database engine for Python.

This is graphite module (installation: pip install graphitedb). You can use it with import graphite.

Modules:

  • algorithms

    Implemented standard graph algorithms for Graphite graph database.

  • exceptions

    Possible exceptions in Graphite

  • instances

    Node and relation instance objects

  • types

    Data, relation, and node type classes for Graphite database

Classes:

  • Direction

    Traverse direction types.

  • SecurityWarning

    A marker warning class used for security-related concerns within Graphite.

Functions:

Classes

Direction

Bases: Enum

Traverse direction types.

Attributes:

  • OUTGOING

    Traverse on relations where current node is source node.

  • INCOMING

    Traverse on relations where current node is target node.

  • BOTH

    Mix of OUTGOING and INCOMING.

Subject To Change

This enum may be replaced by literals.

SecurityWarning

Bases: Warning

A marker warning class used for security-related concerns within Graphite.

It may be raised or emitted when unsafe or potentially dangerous operations are detected.

Functions

engine

engine() -> GraphiteEngine

Creates and returns a new GraphiteEngine instance.

Each engine instance maintains its own:

  • Node types
  • Relation types
  • Nodes
  • Relations
Example
engine = graphite.engine()