opatio.catalog.entry module¶
- class opatio.catalog.entry.CardCatalogEntry(index: FloatVectorIndex, byteStart: int, byteEnd: int, sha256: bytes)[source]¶
Bases:
OPATEntity
Structure to hold the card catalog information for an OPAT file.
- index¶
Index values of the table.
- Type:
- copy() CardCatalogEntry [source]¶
Create a copy of the card catalog entry.
Examples
>>> from opatio.index.floatvectorindex import FloatVectorIndex >>> entry = CardCatalogEntry( ... index=FloatVectorIndex([1.0, 2.0, 3.0]), ... byteStart=0, ... byteEnd=128, ... sha256=b'' * 32 ... ) >>> print(entry) CardCatalogEntry(index=FloatVectorIndex([1.0, 2.0, 3.0]), byteStart=0, byteEnd=128, sha256=b'' * 32)
- ascii() str [source]¶
Generate an ASCII representation of the card catalog.
- Returns:
The ASCII representation of the card catalog.
- Return type:
Examples
>>> entry = CardCatalogEntry( ... index=FloatVectorIndex([1.0, 2.0]), ... byteStart=0, ... byteEnd=64, ... sha256=b'' * 32 ... ) >>> print(entry.ascii()) 1.00 | 2.00 | 0 64 b'\x00\x00\x00\x00'...
- copy() CardCatalogEntry [source]¶
Create a copy of the card catalog entry.
- Returns:
A copy of the card catalog entry.
- Return type:
Examples
>>> entry = CardCatalogEntry( ... index=FloatVectorIndex([1.0, 2.0]), ... byteStart=0, ... byteEnd=64, ... sha256=b'' * 32 ... ) >>> entry_copy = entry.copy()
- index: FloatVectorIndex¶