Skip to content

Library related objects

arcticdb.version_store.library.NormalizableType module-attribute

NormalizableType = Union[NORMALIZABLE_TYPES]

Types that can be normalised into Arctic's internal storage structure.

See Also

Library.write: for more documentation on normalisation.

arcticdb.ReadInfoRequest

Bases: NamedTuple

ReadInfoRequest is useful for batch methods like read_metadata_batch and get_description_batch, where we only need to specify the symbol and the version information. Therefore, construction of this object is only required for these batch operations.

ATTRIBUTE DESCRIPTION
symbol

See read_metadata method.

TYPE: str

as_of

See read_metadata method.

TYPE: Optional[AsOf], default=none

See Also

Library.read: For documentation on the parameters.

arcticdb.ReadRequest

Bases: NamedTuple

ReadRequest is designed to enable batching of read operations with an API that mirrors the singular read API. Therefore, construction of this object is only required for batch read operations.

ATTRIBUTE DESCRIPTION
as_of

See read method.

TYPE: Optional[AsOf], default=none

date_range

See readmethod.

TYPE: Optional[Tuple[Optional[Timestamp], Optional[Timestamp]]], default=none

row_range

See read method.

TYPE: Optional[Tuple[int, int]], default=none

columns

See read method.

TYPE: Optional[List[str]], default=none

query_builder

See read method.

TYPE: Optional[Querybuilder], default=none

See Also

Library.read: For documentation on the parameters.

arcticdb.version_store.library.SymbolDescription

Bases: NamedTuple

A named tuple. Descriptive information about the data stored under a particular symbol.

ATTRIBUTE DESCRIPTION
columns

Columns stored under the symbol.

TYPE: Tuple[NameWithDType]

index

Index of the symbol.

TYPE: NameWithDType

index_type

Whether the index is a simple index or a multi_index. NA indicates that the stored data does not have an index.

TYPE: str {"NA", "index", "multi_index"}

row_count

Number of rows.

TYPE: int

last_update_time

The time of the last update to the symbol, in UTC.

TYPE: datetime64

date_range

The values of the index column in the first and last rows of this symbol in UTC. Both values will be NaT if: - the symbol is not timestamp indexed - the symbol is timestamp indexed, but the sorted field of this class is UNSORTED (see below)

TYPE: Tuple[Union[datetime, datetime64], Union[datetime, datetime64]]

sorted

One of "ASCENDING", "DESCENDING", "UNSORTED", or "UNKNOWN": ASCENDING - The data has a timestamp index, and is sorted in ascending order. Guarantees that operations such as append, update, and read with date_range work as expected. DESCENDING - The data has a timestamp index, and is sorted in descending order. Update and read with date_range will not work. UNSORTED - The data has a timestamp index, and is not sorted. Can only be created by calling write, write_batch, append, or append_batch with validate_index set to False. Update and read with date_range will not work. UNKNOWN - Either the data does not have a timestamp index, or the data does have a timestamp index, but was written by a client that predates this information being stored.

TYPE: str

arcticdb.version_store.library.SymbolVersion

Bases: NamedTuple

A named tuple. A symbol name - version pair.

ATTRIBUTE DESCRIPTION
symbol

Symbol name.

TYPE: str

version

Version of the symbol.

TYPE: int

arcticdb.VersionedItem

Return value for many operations that captures the result and associated information.

ATTRIBUTE DESCRIPTION
library

Library this result relates to.

TYPE: str

symbol

Read or modified symbol.

TYPE: str

data

For data retrieval (read) operations, contains the data read. For data modification operations, the value might not be populated.

TYPE: Any

version

For data retrieval operations, the version the as_of argument resolved to. For data modification operations, the version the data has been written under.

TYPE: int

metadata

The metadata saved alongside data. Availability depends on the method used and may be different from that of data.

TYPE: Any

host

Informational / for backwards compatibility.

TYPE: Optional[str]

arcticdb.version_store.library.VersionInfo

Bases: NamedTuple

A named tuple. Descriptive information about a particular version of a symbol.

ATTRIBUTE DESCRIPTION
date

Time that the version was written in UTC.

TYPE: datetime

deleted

True if the version has been deleted and is only being kept alive via a snapshot.

TYPE: bool

snapshots

Snapshots that refer to this version.

TYPE: List[str]

arcticdb.WritePayload

WritePayload is designed to enable batching of multiple operations with an API that mirrors the singular write API.

Construction of WritePayload objects is only required for batch write operations.

One instance of WritePayload refers to one unit that can be written through to ArcticDB.

__init__

__init__(
    symbol: str,
    data: Union[Any, NormalizableType],
    metadata: Any = None,
)

Constructor.

PARAMETER DESCRIPTION
symbol

Symbol name. Limited to 255 characters. The following characters are not supported in symbols: "*", "&", "<", ">"

TYPE: str

data

Data to be written. If data is not of NormalizableType then it will be pickled.

TYPE: Any

metadata

Optional metadata to persist along with the symbol.

TYPE: Any DEFAULT: None

See Also

Library.write_pickle: For information on the implications of providing data that needs to be pickled.