Skip to content

PropType #

Bases: object

PropType provides access to the types used by Raphtory. They can be used to specify the data type of different properties, which is especially useful if one wishes to cast some input column from one type to another during ingestion. PropType can be used to define the schema in the various load_* functions used for data ingestion (i.e. Graph.load_nodes(...)/Graph.load_edges(...) etc.)

__eq__(value) #

Return self==value.

__ge__(value) #

Return self>=value.

__gt__(value) #

Return self>value.

__le__(value) #

Return self<=value.

__lt__(value) #

Return self<value.

__ne__(value) #

Return self!=value.

__repr__() #

Return repr(self).

__str__() #

Return str(self).

bool() staticmethod #

Boolean type.

Returns:

Type Description
PropType

datetime() staticmethod #

Datetime type (timezone-aware).

Returns:

Type Description
PropType

decimal(scale) staticmethod #

Arbitrary-precision decimal type with a fixed scale (number of digits after the decimal point).

Parameters:

Name Type Description Default
scale int

the number of digits after the decimal point.

required

Returns:

Type Description
PropType

f32() staticmethod #

32-bit float type.

Returns:

Type Description
PropType

f64() staticmethod #

64-bit float type.

Returns:

Type Description
PropType

i32() staticmethod #

Signed 32-bit integer type.

Returns:

Type Description
PropType

i64() staticmethod #

Signed 64-bit integer type.

Returns:

Type Description
PropType

list(p) staticmethod #

List type with a single element type.

Parameters:

Name Type Description Default
p PropType

element type.

required

Returns:

Type Description
PropType

map(hash_map) staticmethod #

Map type with string keys and typed values.

Parameters:

Name Type Description Default
hash_map dict[str, PropType]

mapping from key name to value type.

required

Returns:

Type Description
PropType

naive_datetime() staticmethod #

Naive datetime type (timezone-unaware).

Returns:

Type Description
PropType

str() staticmethod #

String type.

Returns:

Type Description
PropType

u16() staticmethod #

Unsigned 16-bit integer type.

Returns:

Type Description
PropType

u32() staticmethod #

Unsigned 32-bit integer type.

Returns:

Type Description
PropType

u64() staticmethod #

Unsigned 64-bit integer type.

Returns:

Type Description
PropType

u8() staticmethod #

Unsigned 8-bit integer type.

Returns:

Type Description
PropType