graphistry.models.gfql.coercions package#

Submodules#

graphistry.models.gfql.coercions.numeric module#

Pure numeric type transformations

Currently numeric types don’t need much transformation, but this provides a consistent interface.

graphistry.models.gfql.coercions.numeric.to_ast(val)#

Numeric values don’t have special AST representation, pass through

Parameters:

val (int | float | number)

Return type:

int | float | number

graphistry.models.gfql.coercions.numeric.to_native(val)#

Numeric values are already native, just pass through

Parameters:

val (int | float | number)

Return type:

int | float | number

graphistry.models.gfql.coercions.numeric.to_wire(val)#

Convert numeric to JSON-compatible type

Parameters:

val (int | float | number)

Return type:

int | float

graphistry.models.gfql.coercions.temporal module#

Pure temporal type transformations

Functions to convert between Native, Wire, and AST representations.

graphistry.models.gfql.coercions.temporal.to_ast(val)#

Convert any temporal representation to AST (TemporalValue)

Parameters:

val (Timestamp | datetime | date | time | DateTimeWire | DateWire | TimeWire | TemporalValue)

Return type:

TemporalValue

graphistry.models.gfql.coercions.temporal.to_native(val)#

Convert any temporal representation to native Python/Pandas type

Parameters:

val (Timestamp | datetime | date | time | DateTimeWire | DateWire | TimeWire | TemporalValue)

Return type:

Timestamp | time

graphistry.models.gfql.coercions.temporal.to_wire(val)#

Convert temporal to wire format (for JSON serialization)

Parameters:

val (Timestamp | datetime | date | time | TemporalValue)

Return type:

DateTimeWire | DateWire | TimeWire

Module contents#