Types¶
Versioning Engine¶
metaxy.versioning.types.LazyIncrement
¶
Bases: NamedTuple
Result of an incremental update containing lazy dataframes.
Contains three sets of samples: - added: New samples from upstream not present in current metadata - changed: Samples with different provenance - removed: Samples in current metadata but not in upstream state
metaxy.versioning.types.Increment
¶
Bases: NamedTuple
Result of an incremental update containing eager dataframes.
Contains three sets of samples: - added: New samples from upstream not present in current metadata - changed: Samples with different provenance - removed: Samples in current metadata but not in upstream state
metaxy.HashAlgorithm
¶
Keys¶
Types for working with feature and field keys.
Canonical Keys¶
metaxy.FeatureKey
¶
FeatureKey(parts: str | Sequence[str] | FeatureKey)
Bases: _Key
Feature key as a sequence of string parts.
Hashable for use as dict keys in registries. Parts cannot contain forward slashes (/) or double underscores (__).
Example:
```py
FeatureKey("a/b/c") # String format
# FeatureKey(parts=['a', 'b', 'c'])
FeatureKey(["a", "b", "c"]) # List format
# FeatureKey(parts=['a', 'b', 'c'])
FeatureKey(FeatureKey(["a", "b", "c"])) # FeatureKey copy
# FeatureKey(parts=['a', 'b', 'c'])
```
Source code in src/metaxy/models/types.py
Attributes¶
metaxy.FeatureKey.parts
property
¶
Backward compatibility property for accessing root as parts.
metaxy.FeatureKey.table_name
property
¶
table_name: str
Get SQL-like table name for this feature key.
Replaces hyphens with underscores for SQL compatibility.
Functions¶
metaxy.FeatureKey.__lt__
¶
metaxy.FeatureKey.__le__
¶
metaxy.FeatureKey.__gt__
¶
metaxy.FeatureKey.__ge__
¶
metaxy.FeatureKey.__iter__
¶
metaxy.FeatureKey.__getitem__
¶
metaxy.FeatureKey.__contains__
¶
metaxy.FeatureKey.__reversed__
¶
metaxy.FeatureKey.model_dump
¶
Serialize to list format for backward compatibility.
metaxy.FeatureKey.__eq__
¶
metaxy.FieldKey
¶
Bases: _Key
Field key as a sequence of string parts.
Hashable for use as dict keys in registries. Parts cannot contain forward slashes (/) or double underscores (__).
Example:
```py
FieldKey("a/b/c") # String format
# FieldKey(parts=['a', 'b', 'c'])
FieldKey(["a", "b", "c"]) # List format
# FieldKey(parts=['a', 'b', 'c'])
FieldKey(FieldKey(["a", "b", "c"])) # FieldKey copy
# FieldKey(parts=['a', 'b', 'c'])
```
Source code in src/metaxy/models/types.py
Attributes¶
metaxy.FieldKey.parts
property
¶
Backward compatibility property for accessing root as parts.
metaxy.FieldKey.table_name
property
¶
table_name: str
Get SQL-like table name for this feature key.
Replaces hyphens with underscores for SQL compatibility.
Functions¶
metaxy.FieldKey.__lt__
¶
metaxy.FieldKey.__le__
¶
metaxy.FieldKey.__gt__
¶
metaxy.FieldKey.__ge__
¶
metaxy.FieldKey.__iter__
¶
metaxy.FieldKey.__getitem__
¶
metaxy.FieldKey.__contains__
¶
metaxy.FieldKey.__reversed__
¶
metaxy.FieldKey.model_dump
¶
Serialize to list format for backward compatibility.
metaxy.FieldKey.__eq__
¶
Type Annotations¶
These are typically used to annotate function parameters. Most APIs in Metaxy accepts them and perform type coercion into canonical types.
metaxy.CoercibleToFeatureKey
module-attribute
¶
metaxy.CoercibleToFieldKey
module-attribute
¶
Pydantic Type Annotations¶
These types are used for type coercion into canonical types with Pydantic.
metaxy.ValidatedFeatureKeySequence
module-attribute
¶
ValidatedFeatureKeySequence: TypeAlias = Sequence[ValidatedFeatureKey]
metaxy.ValidatedFieldKeySequence
module-attribute
¶
ValidatedFieldKeySequence: TypeAlias = Sequence[ValidatedFieldKey]
Adapters¶
These can perform type coercsion into canonical types in non-pydantic code.
metaxy.ValidatedFeatureKeyAdapter
module-attribute
¶
ValidatedFeatureKeyAdapter: TypeAdapter[ValidatedFeatureKey] = TypeAdapter(ValidatedFeatureKey)
metaxy.ValidatedFeatureKeySequenceAdapter
module-attribute
¶
ValidatedFeatureKeySequenceAdapter: TypeAdapter[ValidatedFeatureKeySequence] = TypeAdapter(ValidatedFeatureKeySequence)
metaxy.ValidatedFieldKeyAdapter
module-attribute
¶
ValidatedFieldKeyAdapter: TypeAdapter[ValidatedFieldKey] = TypeAdapter(ValidatedFieldKey)
metaxy.ValidatedFieldKeySequenceAdapter
module-attribute
¶
ValidatedFieldKeySequenceAdapter: TypeAdapter[ValidatedFieldKeySequence] = TypeAdapter(ValidatedFieldKeySequence)
Other Types¶
metaxy.models.types.SnapshotPushResult
¶
Bases: NamedTuple
Result of recording a feature graph snapshot.
Attributes:
-
snapshot_version(str) –The deterministic hash of the graph snapshot
-
already_pushed(bool) –True if this snapshot_version was already pushed previously
-
updated_features(list[str]) –List of feature keys with updated information (changed full_definition_version)