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 the local repository.
Get the default remote URL for data fetching.
Find remote URLs of data matching regular expression string.
Get manager singleton.
Check if there are updates for data of a certain name.
Get the local repository.
Get the local repository lock timeout.
Get a copy of the current manifest file.
Get the manager mode.
Get the remote data URL for a given data name.
Get the remote URL.
Load a new manifest file.
Return true if a manifest file already exists in the directory.
Reset the manager.
Set the local repository.
Set the manager mode.
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,
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:
- get_last_update_timestamp_for(
- self: ostk.physics.data.Manager,
- data_name: ostk.core.type.String,
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:
- get_local_repository(
- self: ostk.physics.Manager,
Get the local repository.
- Returns:
Local repository.
- Return type:
Directory
- get_local_repository_lock_timeout(
- self: ostk.physics.Manager,
Get the local repository lock timeout.
- Returns:
Local repository lock timeout.
- Return type:
- get_manifest(self: ostk.physics.data.Manager) ostk::physics::data::Manifest ¶
Get a copy of the current manifest file.
- Returns:
Manifest.
- Return type:
- get_mode(self: ostk.physics.Manager) ostk.physics.Manager.Mode ¶
Get the manager mode.
- Returns:
Manager mode.
- Return type:
- get_remote_data_urls(
- self: ostk.physics.data.Manager,
- data_name: ostk.core.type.String,
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,
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:
- 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,
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.