base_model
Module to define the PyDantic base model used in PyCelonis.
This module defines the PyDantic base model used in PyCelonis as well as all required encoding and conversion functions.
Typical usage example:
```python
class PyCelonisModel(PyCelonisBaseModel):
pass
```
PyCelonisBaseModel ¶
Bases: BaseModel
Base Model for any PyCelonis object.
PyCelonisBaseEnum ¶
Bases: Enum
Base class for any PyCelonis enum.
to_camel ¶
Converts snake case string to camel case.
Parameters:
-
string
(str
) –Snake case string to convert.
Returns:
-
str
–A string in camel case.
to_unix_timestamp_ms ¶
Returns datetime in milliseconds since epoch.
Parameters:
-
timestamp
(datetime
) –timestamp to convert to millisecond since epoch.
Returns:
-
int
–An int representing the milliseconds since epoch.