Skip to content

Prop #

Bases: object

__eq__(value) #

Return self==value.

__ge__(value) #

Return self>=value.

__gt__(value) #

Return self>value.

__hash__() #

Return hash(self).

__le__(value) #

Return self<=value.

__lt__(value) #

Return self<value.

__ne__(value) #

Return self!=value.

__repr__() #

Return repr(self).

aware_datetime(value) staticmethod #

Construct a Prop holding a timezone-aware datetime (stored as UTC). Naive datetimes are accepted and interpreted as UTC, matching the convention used elsewhere in Raphtory's time inputs.

Parameters:

Name Type Description Default
value datetime

a datetime. Naive datetimes are treated as UTC.

required

Returns:

Type Description
Prop

bool(value) staticmethod #

Construct a Prop holding a boolean.

Parameters:

Name Type Description Default
value bool

the value to wrap.

required

Returns:

Type Description
Prop

decimal(value) staticmethod #

Construct a Prop holding an arbitrary-precision decimal.

Parameters:

Name Type Description Default
value Decimal | str | int | float

the value to wrap. Strings must parse as a decimal. Note that floats only have ~15-17 digits of precision — pass a string or decimal.Decimal for higher precision.

required

Returns:

Type Description
Prop

dtype() #

Returns the PropType of the wrapped value.

Returns:

Type Description
PropType

f32(value) staticmethod #

Construct a Prop holding a 32-bit float.

Parameters:

Name Type Description Default
value float

the value to wrap.

required

Returns:

Type Description
Prop

f64(value) staticmethod #

Construct a Prop holding a 64-bit float.

Parameters:

Name Type Description Default
value float

the value to wrap.

required

Returns:

Type Description
Prop

i32(value) staticmethod #

Construct a Prop holding a signed 32-bit integer.

Parameters:

Name Type Description Default
value int

the value to wrap.

required

Returns:

Type Description
Prop

i64(value) staticmethod #

Construct a Prop holding a signed 64-bit integer.

Parameters:

Name Type Description Default
value int

the value to wrap.

required

Returns:

Type Description
Prop

list(values) staticmethod #

Construct a Prop holding a list of values.

Parameters:

Name Type Description Default
values list

the values to wrap.

required

Returns:

Type Description
Prop

map(dict) staticmethod #

Construct a Prop holding a string-keyed map of values.

Parameters:

Name Type Description Default
dict dict[str, Any]

the map to wrap.

required

Returns:

Type Description
Prop

naive_datetime(value) staticmethod #

Construct a Prop holding a naive (timezone-unaware) datetime.

Parameters:

Name Type Description Default
value datetime

the value to wrap (any tz info is dropped).

required

Returns:

Type Description
Prop

str(value) staticmethod #

Construct a Prop holding a string.

Parameters:

Name Type Description Default
value str

the value to wrap.

required

Returns:

Type Description
Prop

u16(value) staticmethod #

Construct a Prop holding an unsigned 16-bit integer.

Parameters:

Name Type Description Default
value int

the value to wrap.

required

Returns:

Type Description
Prop

u32(value) staticmethod #

Construct a Prop holding an unsigned 32-bit integer.

Parameters:

Name Type Description Default
value int

the value to wrap.

required

Returns:

Type Description
Prop

u64(value) staticmethod #

Construct a Prop holding an unsigned 64-bit integer.

Parameters:

Name Type Description Default
value int

the value to wrap.

required

Returns:

Type Description
Prop

u8(value) staticmethod #

Construct a Prop holding an unsigned 8-bit integer.

Parameters:

Name Type Description Default
value int

the value to wrap.

required

Returns:

Type Description
Prop