hydra.pg.graphson.syntax module
A syntax model for TinkerPop’s GraphSON format. This model is designed to be as inclusive as possible, supporting GraphSON 4.0 as well as earlier versions. See https://github.com/apache/tinkerpop/blob/master/docs/src/dev/io/graphson.asciidoc.
- class hydra.pg.graphson.syntax.AdjacentEdge(id: Value, vertex_id: Value, properties: Mapping[PropertyKey, Value])
Bases:
objectA GraphSON edge as referenced from an adjacent vertex, with its own properties.
- class Builder(_id: 'Value' = None, _vertex_id: 'Value' = None, _properties: 'Mapping[PropertyKey, Value]' = None)
Bases:
object- build()
- id(id)
- properties(properties)
- vertex_id(vertex_id)
- ID = Name(value='id')
- PROPERTIES = Name(value='properties')
- TYPE_ = Name(value='hydra.pg.graphson.syntax.AdjacentEdge')
- VERTEX_ID = Name(value='vertexId')
- static builder()
- properties: Mapping[PropertyKey, Value]
- with_id(id)
- with_properties(properties)
- with_vertex_id(vertex_id)
- class hydra.pg.graphson.syntax.BigDecimalValue(value: T)
Bases:
Node[str]A GraphSON big-decimal value, represented as a string.
- TYPE_ = Name(value='hydra.pg.graphson.syntax.BigDecimalValue')
- class hydra.pg.graphson.syntax.CompositeTypedValue(type: TypeName, fields: Map)
Bases:
objectA GraphSON composite value tagged with a GraphSON type name.
- class Builder(_type: 'TypeName' = None, _fields: 'Map' = None)
Bases:
object- build()
- fields(fields)
- type(type)
- FIELDS = Name(value='fields')
- TYPE = Name(value='type')
- TYPE_ = Name(value='hydra.pg.graphson.syntax.CompositeTypedValue')
- static builder()
- with_fields(fields)
- with_type(type)
- class hydra.pg.graphson.syntax.DateTime(value: T)
Bases:
Node[str]A GraphSON date-time value, represented as a string.
- TYPE_ = Name(value='hydra.pg.graphson.syntax.DateTime')
- class hydra.pg.graphson.syntax.DoubleValue
Bases:
objectDoubleValueFinite | DoubleValueInfinity | DoubleValueNegativeInfinity | DoubleValueNotANumber
- FINITE = Name(value='finite')
- INFINITY = Name(value='infinity')
- NEGATIVE_INFINITY = Name(value='negativeInfinity')
- NOT_A_NUMBER = Name(value='notANumber')
- TYPE_ = Name(value='hydra.pg.graphson.syntax.DoubleValue')
- class hydra.pg.graphson.syntax.DoubleValueInfinity
Bases:
object
- class hydra.pg.graphson.syntax.DoubleValueNegativeInfinity
Bases:
object
- class hydra.pg.graphson.syntax.DoubleValueNotANumber
Bases:
object
- class hydra.pg.graphson.syntax.Duration(value: T)
Bases:
Node[str]A GraphSON duration value, represented as a string.
- TYPE_ = Name(value='hydra.pg.graphson.syntax.Duration')
- class hydra.pg.graphson.syntax.EdgeLabel(value: T)
Bases:
Node[str]A GraphSON edge label, represented as a string.
- TYPE_ = Name(value='hydra.pg.graphson.syntax.EdgeLabel')
- class hydra.pg.graphson.syntax.FloatValue
Bases:
objectFloatValueFinite | FloatValueInfinity | FloatValueNegativeInfinity | FloatValueNotANumber
- FINITE = Name(value='finite')
- INFINITY = Name(value='infinity')
- NEGATIVE_INFINITY = Name(value='negativeInfinity')
- NOT_A_NUMBER = Name(value='notANumber')
- TYPE_ = Name(value='hydra.pg.graphson.syntax.FloatValue')
- class hydra.pg.graphson.syntax.FloatValueInfinity
Bases:
object
- class hydra.pg.graphson.syntax.FloatValueNegativeInfinity
Bases:
object
- class hydra.pg.graphson.syntax.FloatValueNotANumber
Bases:
object
- class hydra.pg.graphson.syntax.Map(value: T)
Bases:
Node[Sequence[ValuePair]]A GraphSON map, represented as a list of key/value pairs.
- TYPE_ = Name(value='hydra.pg.graphson.syntax.Map')
- class hydra.pg.graphson.syntax.PrimitiveTypedValue(type: TypeName, value: str)
Bases:
objectA GraphSON primitive value tagged with a GraphSON type name.
- class Builder(_type: 'TypeName' = None, _value: 'str' = None)
Bases:
object- build()
- type(type)
- value(value)
- TYPE = Name(value='type')
- TYPE_ = Name(value='hydra.pg.graphson.syntax.PrimitiveTypedValue')
- VALUE = Name(value='value')
- static builder()
- value: str
- with_type(type)
- with_value(value)
- class hydra.pg.graphson.syntax.PropertyKey(value: T)
Bases:
Node[str]A GraphSON property key, represented as a string.
- TYPE_ = Name(value='hydra.pg.graphson.syntax.PropertyKey')
- class hydra.pg.graphson.syntax.TypeName(value: T)
Bases:
Node[str]A GraphSON type name, represented as a string.
- TYPE_ = Name(value='hydra.pg.graphson.syntax.TypeName')
- class hydra.pg.graphson.syntax.Uuid(value: T)
Bases:
Node[str]A GraphSON UUID value, represented as a string.
- TYPE_ = Name(value='hydra.pg.graphson.syntax.Uuid')
- class hydra.pg.graphson.syntax.Value
Bases:
objectValueBigDecimal | ValueBigInteger | ValueBinary | ValueBoolean | ValueByte | ValueChar | ValueComposite | ValueDateTime | ValueDouble | ValueDuration | ValueFloat | ValueInteger | ValueList | ValueLong | ValueMap | ValueNull | ValuePrimitive | ValueSet | ValueShort | ValueString | ValueUuid
- BIG_DECIMAL = Name(value='bigDecimal')
- BIG_INTEGER = Name(value='bigInteger')
- BINARY = Name(value='binary')
- BOOLEAN = Name(value='boolean')
- BYTE = Name(value='byte')
- CHAR = Name(value='char')
- COMPOSITE = Name(value='composite')
- DATE_TIME = Name(value='dateTime')
- DOUBLE = Name(value='double')
- DURATION = Name(value='duration')
- FLOAT = Name(value='float')
- INTEGER = Name(value='integer')
- LIST = Name(value='list')
- LONG = Name(value='long')
- MAP = Name(value='map')
- NULL = Name(value='null')
- PRIMITIVE = Name(value='primitive')
- SET = Name(value='set')
- SHORT = Name(value='short')
- STRING = Name(value='string')
- TYPE_ = Name(value='hydra.pg.graphson.syntax.Value')
- UUID = Name(value='uuid')
- class hydra.pg.graphson.syntax.ValueBigDecimal(value: T)
Bases:
Node[BigDecimalValue]
- class hydra.pg.graphson.syntax.ValueComposite(value: T)
Bases:
Node[CompositeTypedValue]
- class hydra.pg.graphson.syntax.ValueDouble(value: T)
Bases:
Node[DoubleValue]
- class hydra.pg.graphson.syntax.ValueFloat(value: T)
Bases:
Node[FloatValue]
- class hydra.pg.graphson.syntax.ValueNull
Bases:
object
- class hydra.pg.graphson.syntax.ValuePair(first: Value, second: Value)
Bases:
objectA key/value pair in a GraphSON map.
- class Builder(_first: 'Value' = None, _second: 'Value' = None)
Bases:
object- build()
- first(first)
- second(second)
- FIRST = Name(value='first')
- SECOND = Name(value='second')
- TYPE_ = Name(value='hydra.pg.graphson.syntax.ValuePair')
- static builder()
- with_first(first)
- with_second(second)
- class hydra.pg.graphson.syntax.ValuePrimitive(value: T)
Bases:
Node[PrimitiveTypedValue]
- class hydra.pg.graphson.syntax.Vertex(id: Value, label: object, in_edges: Mapping[EdgeLabel, Sequence[AdjacentEdge]], out_edges: Mapping[EdgeLabel, Sequence[AdjacentEdge]], properties: Mapping[PropertyKey, Sequence[VertexPropertyValue]])
Bases:
objectA GraphSON vertex, with its incident edges and properties.
- class Builder(_id: 'Value' = None, _label: 'Optional[VertexLabel]' = None, _in_edges: 'Mapping[EdgeLabel, Sequence[AdjacentEdge]]' = None, _out_edges: 'Mapping[EdgeLabel, Sequence[AdjacentEdge]]' = None, _properties: 'Mapping[PropertyKey, Sequence[VertexPropertyValue]]' = None)
Bases:
object- build()
- id(id)
- in_edges(in_edges)
- label(label)
- out_edges(out_edges)
- properties(properties)
- ID = Name(value='id')
- IN_EDGES = Name(value='inEdges')
- LABEL = Name(value='label')
- OUT_EDGES = Name(value='outEdges')
- PROPERTIES = Name(value='properties')
- TYPE_ = Name(value='hydra.pg.graphson.syntax.Vertex')
- static builder()
- in_edges: Mapping[EdgeLabel, Sequence[AdjacentEdge]]
- out_edges: Mapping[EdgeLabel, Sequence[AdjacentEdge]]
- properties: Mapping[PropertyKey, Sequence[VertexPropertyValue]]
- with_id(id)
- with_in_edges(in_edges)
- with_label(label)
- with_out_edges(out_edges)
- with_properties(properties)
- class hydra.pg.graphson.syntax.VertexLabel(value: T)
Bases:
Node[str]A GraphSON vertex label, represented as a string.
- TYPE_ = Name(value='hydra.pg.graphson.syntax.VertexLabel')
- class hydra.pg.graphson.syntax.VertexPropertyValue(id: object, value: Value)
Bases:
objectA GraphSON vertex property value, with an optional property id.
- class Builder(_id: 'Optional[Value]' = None, _value: 'Value' = None)
Bases:
object- build()
- id(id)
- value(value)
- ID = Name(value='id')
- TYPE_ = Name(value='hydra.pg.graphson.syntax.VertexPropertyValue')
- VALUE = Name(value='value')
- static builder()
- with_id(id)
- with_value(value)