ostk.physics.data.Manager

class Manager

Bases: Manager

OSTk Data manager base class (thread-safe).

The base manager defines methods for tracking and checking the manifest file.

Methods

clear_local_repository

Clear the local repository.

default_remote_url

Get the default remote URL for data fetching.

find_remote_data_urls

Find remote URLs of data matching regular expression string.

get

Get manager singleton.

get_last_update_timestamp_for

Check if there are updates for data of a certain name.

get_local_repository

Get the local repository.

get_local_repository_lock_timeout

Get the local repository lock timeout.

get_manifest

Get a copy of the current manifest file.

get_mode

Get the manager mode.

get_remote_data_urls

Get the remote data URL for a given data name.

get_remote_url

Get the remote URL.

load_manifest

Load a new manifest file.

manifest_file_exists

Return true if a manifest file already exists in the directory.

reset

Reset the manager.

set_local_repository

Set the local repository.

set_mode

Set the manager mode.

set_remote_url

Set the remote URL.

class Mode(self: ostk.physics.Manager.Mode, value: int)

Bases: pybind11_object

Members:

Manual

Automatic

property name
clear_local_repository(self: ostk.physics.Manager) None

Clear the local repository.

static default_remote_url() ostk.io.URL

Get the default remote URL for data fetching.

Returns:

Default remote URL.

Return type:

URL

find_remote_data_urls(
self: ostk.physics.data.Manager,
data_name_regex_pattern: ostk.core.type.String,
) list[ostk.io.URL]

Find remote URLs of data matching regular expression string.

Parameters:

data_name_regex_pattern (String) -- A regular expression string

Returns:

List of URLs.

Return type:

List[URL]

static get() ostk.physics.data.Manager

Get manager singleton.

Returns:

Manager instance.

Return type:

Manager

get_last_update_timestamp_for(
self: ostk.physics.data.Manager,
data_name: ostk.core.type.String,
) ostk.physics.time.Instant

Check if there are updates for data of a certain name.

Parameters:

data_name (String) -- Name of the data to query. This is the key for the data entry in the manifest file.

Returns:

Instant indicating when the data was last updated on the remote, according to the manifest record.

Return type:

Instant

get_local_repository(
self: ostk.physics.Manager,
) ostk.core.filesystem.Directory

Get the local repository.

Returns:

Local repository.

Return type:

Directory

get_local_repository_lock_timeout(
self: ostk.physics.Manager,
) ostk::physics::time::Duration

Get the local repository lock timeout.

Returns:

Local repository lock timeout.

Return type:

Duration

get_manifest(self: ostk.physics.data.Manager) ostk::physics::data::Manifest

Get a copy of the current manifest file.

Returns:

Manifest.

Return type:

Manifest

get_mode(self: ostk.physics.Manager) ostk.physics.Manager.Mode

Get the manager mode.

Returns:

Manager mode.

Return type:

Mode

get_remote_data_urls(
self: ostk.physics.data.Manager,
data_name: ostk.core.type.String,
) list[ostk.io.URL]

Get the remote data URL for a given data name.

Parameters:

data_name (String) -- Name of the data. i.e. the key for the data entry in the manifest

Returns:

List of URLs.

Return type:

List[URL]

get_remote_url(self: ostk.physics.data.Manager) ostk.io.URL

Get the remote URL. This points to the base URL for the OSTk input data.

Returns:

Remote URL.

Return type:

URL

load_manifest(
self: ostk.physics.data.Manager,
manifest: ostk::physics::data::Manifest,
) None

Load a new manifest file.

Parameters:

manifest (Manifest) -- Manifest.

manifest_file_exists(self: ostk.physics.data.Manager) bool

Return true if a manifest file already exists in the directory.

Returns:

True if the manifest file exists.

Return type:

bool

reset(self: ostk.physics.data.Manager) None

Reset the manager.

Unload the manifest file and forget manifest age.

set_local_repository(
self: ostk.physics.Manager,
directory: ostk.core.filesystem.Directory,
) None

Set the local repository.

Parameters:

directory (Directory) -- Local repository.

set_mode(self: ostk.physics.Manager, mode: ostk.physics.Manager.Mode) None

Set the manager mode.

Parameters:

mode (Mode) -- Manager mode.

set_remote_url(self: ostk.physics.data.Manager, remote_url: ostk.io.URL) None

Set the remote URL.

Parameters:

remote_url (Directory) -- Remote URL.